require "prime" N = gets.to_i n = 1 count = 0 Prime.each do |p| if n * p <= N n *= p count += 1 else break end end puts count