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

int main(){
  int input;
  while(scanf("%d",&input) != EOF){
    int count = 1;
    for(int i = 3;i <= input;i += 2){
      bool isPrime = false;
      for(int s = 3;s <= sqrt((float)i);s += 2){
        if(i % s == 0){isPrime = true; break;}
      }
      if(!isPrime)count++;
    }
    if(input == 2)printf("1\n");
    else if(input < 2)printf("0\n");
    else printf("%d\n",count);
  }

  return 0;
}