                                          
#include <iostream>
#include <iomanip>
#include <cmath>


using namespace std;


int main(){
  int n;
  //?´???°???true,                                                                    
  bool flag = false;

  while(cin >> n){
    int cnt=0;
    //cout << n << endl;                                                           
    //    sqrt_n = sqrt(n);                                                        
    for(int i=2;i<=n;i++){
      flag = false;
      //?´???°?????????????????§??????                                                       
      for(int j=2;j<=sqrt(i);j++){
        //      cout << i << " " << j << endl;                                     
        //cout << j << endl;                                                       
        if(i%j==0){
          flag = true;
          //cout << i%j << endl;                                                   
          break;
        }

      }
      if(flag){continue;}

      cnt++;
      //cout << "last: " << i << endl;                                             
    }
    //cout << "cnt: " << cnt << endl;                                              
    cout << cnt << endl;

  }
}