n = int(input()) c = 0 i = 1 while i <= n: if i % 3 == 0: c += 2 if i % 5 == 0: c += 2 i += 1 print(c)