n=list(range(1,int(input())+1)) b='' for a in n: if a%3==0 and a%5==0: a='FizzBuzz' elif a%3==0: a='Fizz' elif a%5==0: a='Buzz' b+=str(a) b=list(b) print(b.count('z'))