#include <iostream>
#include <string>
using namespace std;
int main()
{
	int a = 0, b = 0;
	while (cin >> a)
	{
		b = 0;
		for (int i = 2; i <= a; i++)
		{
			int c = 0;
			for (int j = 2; j < i; j++)
			{
				if (i % j == 0)
				{
					c = 1;
				}
			}
			if (c == 0)
			{
				b++;
			}
		}
		cout << b << endl;
	}
	return 0;
}