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


int main() {

//変数の宣言

	int i,n,j;
	
	while(cin>>n){
		vector<int> prime;
		prime.push_back(2);
		
		for(i=3;i<n+1;i++){
			for(j=0;j<prime.size();j++){
				if (i%prime[j]==0) break;
				if (j==prime.size()-1) {
					prime.push_back(i);
				}
			}
		}
		
		/*
		for(i=0;i<prime.size();i++){
			cout << prime[i] <<endl;
		}
		*/
		cout << prime.size() <<endl;
	}

	return 0;
}