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

int main()
{
	int n;
	int i,j,count,flag,temp;
	while(cin>>n)
	{
		count = 0;
		for(i = 3;i <= n;i++)
		{
			flag = 0;
			temp = sqrt(i);
			for(j = 2;j<=temp;j++)
			{
				if(i%j==0)
				{
					flag = 1;
					break;
				}
			}
			if(flag!=1)
				count++;
		}
		cout<<count+1<<endl;
	}
	return 0;
}