N=list(map(int, input().split())) ans="" for i in N: if i % len("ABC") == len("") and i % len("ABCDE") == len(""): ans += "FizzBuzz" elif i % len("ABC") == len(""): ans += "Fizz" elif i % len("ABCDE") == len(""): ans += "Buzz" else: ans += str(i) print(len(ans))