#include <stdio.h>

int isPrime(int x){
  int i;

  if(x == 0 || x == 1) return 0;

  for(i=2;i*i<=x;i++){
    if(x % i == 0){
      return 0;
    }
  }
  return 1;
}

int main(void){
  int i,n;
  int res;

  while(scanf("%d",&n) != EOF){
    res = 0;
    for(i=2;i<=n;i++){
      if(isPrime(i)){
        res++;
      }
    }
    printf("%d\n",res);
  }

  return 0;
}