
#include <iostream>
#include <stdlib.h>
using namespace std;
#define thefor(i,end) for (i=0;i<end;i++)
int main()
{    
	int n,con,a,i,j;
	while(cin>>n)
	{
		con=1;
		for (i=3;i<=n;i++)
		{
			for (j=2;j<i;j++)
			{
				if (i%j==0)
				{
					break;
				}
			}
			if (j==i)
			{
				con++;
			}
		}
		cout<<con<<endl;
	}
	
}