from itertools import combinations, count, accumulate, product from typing import List from math import ceil, sqrt from collections import defaultdict def main(): N = int(input()) primes = list(calc_prime_numbers(1000)) max_prime = 1 idx = 0 while max_prime * primes[idx] <= N: max_prime *= primes[idx] idx += 1 print(idx) def calc_prime_numbers(upper: int) -> List[int]: if upper < 2: return [] if upper == 3: return [2] if upper == 4: return [2, 3] if 5 <= upper <= 6: return [2, 3, 5] if 7 <= upper <= 10: return [2, 3, 5, 7] sqrt_upper = ceil(sqrt(upper)) primes = [] prime_flag = [False, True] * (upper // 2 + 1) prime_flag[1] = False prime_flag[2] = True for num in range(3, len(prime_flag)): if not prime_flag[num]: continue if num * 2 >= len(prime_flag): continue for multi_num in range(num * 2, len(prime_flag), num): prime_flag[multi_num] = False return (num for num, flag in enumerate(prime_flag) if flag) if __name__ == "__main__": main()