while n=gets
	n=n.to_i
	j=2
	pri=0
	while j<=n
		root=Math.sqrt(j).to_i
		count=0
		i=2
		
		while i <= root
			if j%i == 0
				count+=1
				break
			end
			if i==2
				i+=1
			else
				i+=2
			end
		end
		
		
		if count==0
			pri+=1
		end
		j+=1
	end
puts pri
end