#include<stdio.h>
#include<math.h>

int main(void){
  int n, a, b, i, j, count=0, A[10000];
  scanf("%d", &n);
  for(i=0;i<n;i++){
      j = 2;
      b = sqrt(a);
      while(a % j > 0 && j <= b) j++;
      if(j == b){
        A[count] = a;
        count++;
      }
    }
  }
  printf("%d\n", count);
  return 0;
}