# def prime? x
	
# end


require "prime"
def getprimenum x
	counter = 0

	(x + 1).upto(2 * x) {
		counter += 1 if Prime.instance.prime?(x)
	}

	return counter
end

loop {
	puts getprimenum(gets.chomp.to_i)
}