#!/usr/bin/env ruby
# encoding: utf-8

while n = gets
	n = n.chomp.to_i
	count = 1
	i = 2
	while i <= n
		j = 2
		if i % 2 == 1
			while j**2 <= i
				if i % j == 0
					break
				end
				j += 2
			end
			if i % j != 0
				count += 1
			end
		end
		i += 1 
	end
	puts count
end