a = int(input()) cnt = 0 for x in range(a): if (x+1) % 3 == 0: cnt += 2 if (x+1) % 5 == 0: cnt += 2 print(cnt)