#include<stdio.h>
#include<math.h>
int main(){
	int n,c,i,j,k;
	while(scanf("%d",&n)!=EOF){
		c=1;
		for(j=3;j<=n;j+=2){
			k=1;
			i=3;
			while( i <= sqrt(j) ){
				if(j%i==0){
					k=0;
					break;
				}
				i = i + 2;
			}
			if(k){
				c++;
			}
		}
		printf("%d\n",c);
	}
	return 0;
}