while line = gets
  list = (2..line.to_i).to_a
  count = 0
  while not list.empty?
    count += 1
    new_list = []
    list.each do |n|
      new_list << n unless n % list.first == 0
    end
    list = new_list
  end
  puts count
end