import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A = list(map(int, read().split())) def f(n): bl3 = n%3 == 0 bl5 = n%5 == 0 if bl3 and bl5: return 'FizzBuzz' if bl3: return 'Fizz' if bl5: return 'Buzz' return str(n) word = ''.join(map(f,A)) answer = len(word) print(answer)