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

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