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

void count_Prime(int n);
int Euclid(int n, int m);

int main()
{
	int Data;

	while (cin >> Data)
	{
		count_Prime(Data);
	}

	return 0;
}

void count_Prime(int n)
{
	int counter = 0;
	for (int i = 2; i <= n; i++)
	{
		for (int j = 2; j <= i; j++)
		{
			int euclid = Euclid(j, i);
			// ?????§??¬?´???°???1(??????????´?)?????????????????¨????????¨??????
			if (euclid == i)
				counter++;     // ????????????????????§??????
			else if ( euclid != 1)               // ?????????????????¨??????Break????¨????????????\
				break;
		}
	}

	cout << counter << endl;

}

int Euclid(int n, int m)
{
	if (m % n == 0)
	{
		return n;
	}
	else
	{
		return Euclid(m%n, n);
	}
}