#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	int m,i,k,n;
	while(cin>>n)
	{
		int j=0;
		for(m=2;m<=n;m++)
		{
		    k=int(sqrt(double(m)));
		    i=2;
		    while(m%i&&i<=k)
				i++;
			if(i>k)
				j+=1;
		}
		cout<<j<<endl;
	}
	return 0;
}