#include<stdio.h>
int main(void){
   int s[10000], l, m, n, i, sum;
   sum = 0;
   for ( i = 1; i <= 1000000; i++ ) {
      s[i] = 0;
   }
   for ( k = 2; k <= 1000000; k++ ){
      if (s[k] == 0) {
         for ( l = 2; l <= 100000 / k; l++ ) {
            s[k * l] = 1;
         }
      }
   }
   while(scanf("%d", &n) != EOF){
      for(i = 1; i <= n; i++){
         if(s[i] == 0){
            sum++;
         }
      }
   }
   printf("%d", sum);
   return 0;
}