#include<stdio.h>
#include<math.h>

int prime(int a){

int i,p;

	
	if(a == 2) return 1;
	if(a % 2 == 0) return 0;
		p = sqrt(a);
	for(i=3;i<=p;i+=2){
		if(a%i == 0) return 0;
	}
return 1;
}

int main(void){
	
	int a,i,count=0;
	
	while(scanf("%d",&a) != EOF){;
	
	for(i=2;i<=a;i++){
		
		count += prime(i);
	}
	
	printf("%d\n",count);
}

return 0;
}