a = list(map(int, input().split())) ans = 0 for i in range(len(a)): if a[i] % 5 == 0 and a[i] % 3 == 0: ans += len("FizzBuzz") elif a[i] % 5 == 0 or a[i] % 3 == 0: ans += 4 else: ans += 1 print(ans)