#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
static const double EPS = 1e-10;

int main(){
	vector<int> p;
	bool b;
	int n;

	while(cin >> n){
		p.clear();
		p.push_back(2);
		for(int i = 3; i <= n; i++){
			b = true;
			for(int j = 0; j < p.size(); j++){
				if(p[j]*p[j] > i){
					break;
				}
				if(i % p[j] == 0){
					b = false;
					break;
				}
			}
			if(b){
				p.push_back(i);
			}
		}
		cout << p.size() << endl;
	}

	return 0;
}