n = int(input()) z = 0 a = n // 15 z += a * 4 b = n // 5 c = n // 3 d = b+c - 2*a z += d * 2 print(z)