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