#include <cmath>
#include <iostream>

using namespace std;

bool isprime(int N)
{
	for (int I = 2; I <= sqrt(N); I++)
	{
		if (N % I == 0) return false;
	}

	return true;
}

int main()
{
	int n;

	int c = 0;

	cin >> n;

	for (int i = 2; i <= n; i++)
	{
		if (isprime(i) == true)
		{
			c += 1;
		}
	}

	cout << c << endl;

	return 0;
}