#include<cstdio>
#include<cmath>
#include<cstring>
int prime(long long num)
{
    for(int i=2;i<=sqrt(num);i++)
	if(num%i==0)
	    return 0;
    return 1;
}
int main()
{
    long long n;
    while (scanf("%lld",&n)!=EOF)
    {
    	int sum=0;
    	for (int i=2;i<=n;i++)
    	  if (prime(i)) sum++;
    	printf("%lld\n",sum);
	}
    return 0;
}