n = int(input()) fb = int(n / 15) f = int(n / 3) b = int(n / 5) print(fb * 4 + (f + b) * 2 - fb * 4)