a, b, c, d, e = map(int, input().split()) numbers = [a, b, c, d, e] words = [] for i in numbers: if i % 3 == 0 and i % 5 == 0: words += "FizzBuzz" elif i % 3 == 0: words += "Fizz" elif i % 5 == 0: words += "Buzz" else: words += str(i) print(len(words))