N = int(input()) count_z = 0 for i in range(N): i += 1 if i%3 == 0: count_z += 2 if i%5 == 0: count_z += 2 print(count_z)