def main(): n = int(input()) nums = range(1, n + 1) for num in nums: if num % 3 == 0 and num % 5 == 0: num = "FizzBuzz" elif num % 3 == 0: num = "Fizz" elif num % 5 == 0: num = "Buzz" else: num = str(num) str_nums = "".join(nums) count = 0 for j in str_nums: if j == "z": count += 1 print(count) if __name__ == "__main__": main()