def prime_judge(n)
	if n == 1
		return 0
	elsif n == 2
		return 1
	end

	if (n % 2) == 0
		return 0
	end

	for i in 3..(n - 1)
		if (n % i) == 0
			return 0
		end
	end

	return 1
end

while n = gets.to_i
count = 0

for i in 1..n
	count = count + prime_judge(i)
end

puts count
end