class Problem0637: def solve(this): res = list(map(int, input().split())) cnt = 0 for v in res: if v % 3 == 0 and v % 5 == 0: cnt += len("FizzBuzz") elif v % 3 == 0: cnt += len("Fizz") elif v % 5 == 0: cnt += len("Buzz") else: cnt += len(str(v)) print(cnt) if __name__ == "__main__": problem = Problem0637() problem.solve()