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

int main()
{
	vector<int> prime,count;
	int j, k, x, num;
	while (cin >> num){
		prime.push_back(2);
		x = 1;
		k = 1;
		while (prime[k-1] <= num)
		{
			x += 2;
			j = 0;
			while (j < k && x % prime[j] != 0)j++;
			if (j == k)
			{
				prime.push_back(x);
				k++;
			}
		}
		count.push_back(prime.size() - 1);
		prime.clear();
	}
	for (int i = 0; i < count.size(); i++)
	{
		cout << count[i] << endl;
	}
	return 0;
}