import math

def isPrime(n):
	if n==1: return False
	if n==2: return True
	for i in range(2,int(math.sqrt(n))+2):
		if n%i==0: return False
	return True

while True:
	a = input()
	if a=='EOF': break
	sum = 0
	for i in range(1,a+1):
		if isPrime(i)==True:
			sum+=1
	print sum