A = list(map(int, input().split())) ans = 0 for a in A: if a%3==0 and a%5==0: ans+=len("FizzBuzz") elif a%3==0: ans+=len("Fizz") elif a%5==0: ans+=len("Buzz") else: ans+=len(str(a)) print(ans)