#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
Volume0-0009
=end

require 'prime'

h = {2=>true}
while STDIN.gets do
  n = $_.to_i
  m = 1
  if n>2 then
    3.step(n,2){|i|
      if h.has_key?(i) then
        m += 1
      elsif Prime.prime?(i) then
        m += 1
        h[i] = true
      end
    }
  end
  puts m

end