#include<iostream>
using namespace  std;
bool isPrime(int p)
{
	bool flag = true;
	for (int i = 2; i * i <= p; i++)
	{
		if (p % i == 0)
		{
			flag = false;
			break;
		}
	}
	return flag;
}
int main()
{
	int n;
	while (cin >> n)
	{
		int count = 0;
		for (int i = 2; i <= n; i++)
		{
			if (isPrime(i))count++;
		}
		cout << count << endl;
	}
	return 0;
}