#include<cstdio>
int solve(int n){
	for(int i=2;i*i<=n;i++){
		if(n % i == 0){
			return 0;
		}
	}
	return 1;
}

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