Score : 200 points
Let us define the FizzBuzz sequence a_1,a_2,... as follows:
Find the sum of all numbers among the first N terms of the FizzBuzz sequence.
Input is given from Standard Input in the following format:
N
Print the sum of all numbers among the first N terms of the FizzBuzz sequence.
15
60
The first 15 terms of the FizzBuzz sequence are:
1,2,\mbox{Fizz},4,\mbox{Buzz},\mbox{Fizz},7,8,\mbox{Fizz},\mbox{Buzz},11,\mbox{Fizz},13,14,\mbox{FizzBuzz}
Among them, numbers are 1,2,4,7,8,11,13,14, and the sum of them is 60.
1000000
266666333332
Watch out for overflow.