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

int main(){
	int n,t;
	while(scanf("%d",&n)!=EOF){
		int c=1;
		for(int i=3;i<=n;i+=2){
			int j=3;
			t=1;
			while( j <= sqrt(i) ){
				if(i%j==0){
					t=0;
				}
				j+=2;
			}
			if(t!=0){
				t=1;
			}
			if(t){
				c++;
			}
		}
		printf("%d\n",c);
	}
	return 0;
}