#include<iostream>

using namespace std;

int n;

bool PrimeJudge(int n)
{
	bool judge = true;
	for(int i=2;i<n;++i)
	{
		if(n%i>1)
		{
			judge = false;
			break;
		}
	}
	return judge;
}

int main()
{
	while(cin>>n)
	{
		int count=0;
		for(int i=1;i<=n;++i)
		{
			if(PrimeJudge(i))
			{
				++count;
			}
		}
		cout<<count<<endl;
	}
}