#include<iostream>
#include<vector>

using namespace std;

int main()
{
	int num;
	cin >> num;

	if(num<2){
		cout <<"0"<<endl;
		return 0;
	}

	vector<bool> a(num,true);
	int cnt = num-2;
	for(int ix = 2;ix != num;++ix){
		int jx = 1;
		while((++jx)*ix < num){
			if(a[ix*jx]){
				a[ix*jx] = false;
				cnt--;
			}
		}
	}

	cout <<cnt<<endl;

	return 0;
}