def prime?(n)
  for i in (2..Math.sqrt(n)) do
    if n % i == 0 then return false end
  end
  return true
end

while line = gets do
  n = line.to_i
  counter = 0
  for i in (2..n) do
    if prime?(i) then counter += 1 end
  end
  puts counter
end