require "prime"

def f(n)
   if n < 2
      return 0
   elsif Prime.prime?(n)
      return f(n - 1) + 1
   else
      return f(n - 1)
   end
end
#main
arr = Array.new
while n = gets
   arr << n.to_i
end
arr.each do |i|
   puts f(i)
end