while n = gets
  n.to_i
  if n == 1
    puts 0
    next
  elsif n == 2
    puts 1
    next
  else
    prime = 1
    for i in 3..n
      next if i%2 == 0
      nums = (3...i).to_a.delete_if{ |a| a%2 == 0 }
      prime += 1 if nums.all?{ |a| i%a != 0 }
    end
    puts prime
  end
end