def main(): N = int(input()) z = 0 for i in range(1, N + 1): if not i % 3: z += 2 if not i % 5: z += 2 print(z) main()