#include <stdio.h>

int main(void) {
	int n,i,c,k,t;
	while(scanf("%d",&n) != EOF){
	i = 0;
	for(c = 2; n >= c; c++){
		t = 0;
		for(k = 2; c/2 >= k; k++){
			if(c%k == 0){t =1;break;}
		}
		if(t == 0)i++;
	}

	printf("%d\n",i);
	}
	
	return 0;
}