#include<stdio.h>

bool p(int a){
	if(a==2)return true;
	if(a<2||a%2==0)return false;
	for(int i=3;i*i<=a;i+=2){
		if(a%i==0)return false;
	}
	return true;
}

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