#include <iostream>

int main(void)
{
	int32_t n = 0;
	int32_t count = 0;
	int32_t count2 = 0;
	bool flag = false;

	while (std::cin >> n)
	{
		count2 = 0;
		for (int i = 2; i <= n; i++)
		{
			flag = false;
			for (int j = i-1; j > 1; j--)
			{
				if (i % j == 0)
				{
					flag = true;
					break;
				}
			}
			if (flag == false)
			{
				count2++;
			}
		}
		std::cout << count2 << std::endl;
	}
	return 0;
}