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