On an Exponential Sum