#include <iostream>
#include <cmath>
using namespace std;

int main()
{
  int n;
  while(cin >> n){
    double nd=(double)n;
    int root=(int)sqrt(nd);
    int count=0;
    for(int i=2;i<=n;i++){
      int j;
      for(j=2;j<=root;j++){
        if(i%j==0) break;
      }
      if(j==root) count++;
    }
    cout << count << endl;
  }
  
  return 0;
}