n_list = range(1, int(input())+1) z = 0 for i in n_list: if i % 15 == 0: z += 4#FizzBuzz elif i % 3 == 0 or i % 5 == 0: z += 2#Fizz or Buzz print(z)