A = list(map(int, input().split())) text = str() for i in range(len(A)): if A[i] % 5 == 0 and A[i] % 3 == 0: text += 'FizzBuzz' elif A[i] % 5 == 0: text += 'Buzz' elif A[i] % 3 == 0: text += 'Fizz' else: text += str(A[i]) print(len(text))