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

int main(){
  int input;
  scanf("%d",&input);
  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++;
  }
  printf("%d\n",count);


  return 0;
}