n = int(input()) z = int(n/3) + int(n/5) #+ int(n/15) print(2*z)