#include<iostream>
using namespace std;

long long a[999999]={2,3,5};
int count=3;
long long maxc=6;
int main(){

	int t;
	while(cin>>t){

		if(t<maxc){
			int i=0;
			for(;a[i]<=t&&i<count;i++);
			cout<<i<<endl;
		}else{
			for(long long j=maxc;j<=t;j++){
				bool r=true;
				for(int i=0;i<count&&a[i]*a[i]<=j;i++){
					if(!(j%a[i]))
						r=false;
				}
				if(r)
					a[count++]=j;
			}
			maxc=t+1;
			cout<<count<<endl;
		}

	}

	return 0;
}