#include <iostream>
#include <forward_list>
#include <numeric>
using namespace std;

int eratos(forward_list<int> xs) {
	if (xs.empty()) return 0;
	int head = xs.front();
	xs.pop_front();
	xs.remove_if([&](int n){
		    return !(n%head);
		    });
	return 1+eratos(xs);
}

int main() {
	int n;
	while (cin>>n) {
		forward_list<int> ls(n-1);
		iota(begin(ls),end(ls),2);
		cout << eratos(ls) << endl;
	}
	return 0;
}