#include<stdio.h>

int prime(int n);
int main(){
	int count=0;
	int n;
	while(scanf("%d",&n)!=EOF){
		printf("%d\n",prime(n));
	}
	return 0;
}

int prime(int n){
	int i,j;
	int p=0;
	int count=0;
	for(i=2;i<=n;i++){
		for(j=2;j<i;j++){
			if(i%j==0)p++;
		}
		if(p==0)count++;
		p=0;
	}
	return count;
}