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

bool check_prime(int n)
{
	if (n<=1)
		return false;
	if (n==2)
		return true;
	for (int i=2;i<=n/2;i++)
		if (n%i==0)
			return false;
	return true;
}

int count_prime(int n)
{
	int count = 0;
	for (int i=2;i<=n;i++) 
		if (check_prime(i)) 
			count++;

	return count;
}

int main()
{
	int n = 0;
	vector<int> result;

	while(cin >> n) 
		result.push_back(count_prime(n));

	for(int i=0;i<result.size();i++)
		cout << result[i] << endl;

	return 0;
}