def isPrime(n)
if n == 1 then return false end
if n == 2 then return true end
if n%2 == 0 then return false end
lim = Math.sqrt(n).to_i
3.step(lim, 2){ |i|
  if(n%i==0) then return false end
}
return true
end

while STDIN.gets do

n = $_.to_i

count = 0
n.times{ |i|
  if isPrime(i) then count += 1 end
}

puts count

end