#include <stdio.h>

long check_prime(int a)
{
   long c;

   for ( c = 2 ; c <= a-1; c++ )
   {
      if ( a%c == 0 )
      {
	    return 0;
      }

   }
   if ( c == a )
      return 1;
}

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

    scanf("%ld",&n);

 for(i=2;i<=n;i++)
 {

   result = check_prime(i);

   if ( result == 1 )
     prime = prime +1;
 }

 printf("%ld",prime);
 printf("\n");
 return 0;
}