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

int main(void){
	int n;
	
	int i,j;
	int count = 0;
	int Flag = 0;
	
	while(scanf("%d",&n) != EOF){
		for(j = 2;j <= n;j++){
			for(i = 1;pow(i,2) <= j;i++){
				if(j % i == 0&&i != 1){
					Flag = 1;
					break;
				}
			}
			if(Flag != 1){
				count++;
			}
			Flag = 0;
		}
		printf("%d\n",count);
		count = 0;
	}
	return 0;
}