#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
	int tmp;
	while (cin >> tmp)
	{
		vector<int> prime;

		for (int i(2); i <= tmp; ++i)
		{
			for (vector<int>::iterator i2(prime.begin()), n2(prime.end()); i2 != n2; ++i2)
			{
				if ((i % *i2) == 0)
				{
					goto nx;
				}
			}

			prime.push_back(i);
		nx:;
		}

		cout << prime.size() << endl;

		prime.clear();
	}

	return 0;
}