#include<iostream>

using namespace std;

int main(void){
	
	long int n,f,k,i;
	int count;
	bool chk;
	while(scanf("%d",&n)!=EOF){
		count=0;
		for(i=2;i<=n;i++){
		
			chk=0;
			f=i/2;
			k=2;
		
			while(f>=k){
				if((i%k)==0){
					chk=true;
					break;
				}
				k++;
			}
		
			if(chk==false){
				count++;
			}
		}
		cout<<count<<endl;
	}
}