def is_prime

end


while input = gets
  n = input.chomp.to_i
  if n == 1 
    puts 0
    next
  end
  if n == 2
    puts 1
    next
  end

  prime = [2]
  (2..n).each do |i|
    prime.each do |j|
      break if i % j == 0
      if i % j != 0
        prime << i if j == prime.last
      end
    end
  end
  puts prime.length
end


