#include <stdio.h>
#include <math.h>
int check_prime(int a)
{
   int c,b;
   b = (int)sqrt(a);
   for ( c = 2 ; c <=  b; c++ )
   {
      if ( a%c == 0 )
        return 0;
   }
      return 1;
}

int main ()
{
    int  n=0,i=0,prime=0,result=0;

   while( scanf("%d",&n) != EOF)
{
 for(i=2;i<=n;i++)
 {

   result = check_prime(i);

   if ( result == 1 )
     prime = prime +1;
 }
 printf("%d",prime);
 printf("\n");
 prime=0;
}
 return 0;
}