import std.stdio,
    std.array,
    std.conv,
    std.string,
    std.algorithm,
    std.math;

void main(){
  string s;
  for(;;){
    s=readln();
    if(stdin.eof()) break;
    int num = to!int(chomp(s));
    int result = 0;
    if(num > 2) ++result;
    for(int i=3;i <= num;i+=2){
      int k = 0;
      for(int j = 3;j <= sqrt(cast(double)(i));j+=2){
        if(i%j == 0){
          k = 1;
          break;
        }
      }
      if(k == 0) ++result;
    }
    writeln(result);
  }
}