a = list(map(int, input().split())) b = list() for i in range(len(a)): b.append("") if a[i] % 3 == 0: b[-1] = "Fizz" if a[i] % 5 == 0: b[-1] += "Buzz" if len(b[-1]) == 0: b[-1] = str(a[i]) ans = len("".join(b)) print(ans)