A = list(map(int, input().split())) B = [] for i in A: if i % 3 == 0 and i % 5 == 0: B.append("FizzBuzz") elif i % 3 == 0 and i % 5 != 0: B.append("Fizz") elif i % 5 == 0 and i % 3 != 0: B.append("Buzz") else: B.append(i) charString = list(map(str, B)) output = ''.join(charString) print(len(output))