#include<iostream>
#include<cmath>
using namespace std;

int main(){

	int n, i, j, prmnum;
	bool prm = true;
	while(cin>>n){
		prmnum = 1;

		for( i=3;i<=n;i+=2 ){
			prm = true;

			for( j=3;j<=sqrt((double)i);j+=2 ){
				if( i%j == 0 ){
					prm = false;
					break;
				}
			}


			if(prm)prmnum++;
		}


		cout << prmnum << endl;
	}
	return 0;
}