#include <iostream>
#define Even(n) n%2
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, euclid = 0, i = 0, j = 0;
	for (i = 2; i <= n; ++i)
	{
		if (Even(i) != 0 || i == 2)
		{
			for (j = 2; j <= i; ++j)
			{
				euclid = Euclid(j, i);
				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);
	int r = m % n;

	while (r != 0)
	{
		m = n;
		n = r;
		r = m % n;
	}

	return n;
}