#include <stdio.h>

int main(void){
	int i,j;
	int n;
	int cnt;
	int prime_cnt;

	while(scanf("%d",&n) != EOF){
		prime_cnt = 0;
		for(i = 0;i < n+1;i++){
			cnt = 0;
			if(i < 2) continue;
			if(i == 2){
				prime_cnt++;
				continue;
			}
			for(j = 2;j < i;j++){
				if(i % j == 0 || i == 1)
					cnt++;
					break;
			}
			if(cnt == 0) prime_cnt++;
		}
		printf("%d\n",prime_cnt);		
	}
	return 0;
}