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

require 'prime'

while STDIN.gets do
  n = $_.to_i
  m = 0
  2.upto(n){|i|
    if Prime.prime?(i) then
      m += 1
    end
  }
  puts m
end