#include<stdio.h>
int main(void)
{
	int i=0,j=0;
	int n=0;
	int count=0;
	int kioku[200000]={0};
	int flg=0;
	while (scanf("%d",&n)!=EOF)
	{
		count=0;
		if (n>=2)
		{
			kioku[0]=2;
			count++;
		}
		for (i=3;i<=n;i+=2)
		{
			for (j=0;j<count;j++)
			{
				if (i%kioku[j]==0)
				{
					flg=1;
					break;
				}
			}
			if (flg==1)
			{
				flg=0;
			}
			else
			{
				kioku[count]=i;
				count++;
			}
		}
		printf("%d\n",count);
	}
	return 0;
}