#include <iostream>                                                                                                     
#include <vector>                                                                                                       
                                                                                                                        
using namespace std;                                                                                                    
                                                                                                                        
int main() {                                                                                                            
  int n;                                                                                                                
  cin >> n;                                                                                                             
                                                                                                                        
  if (n == 1) { cout << 0 << endl; return 0; }                                                                          
  if (n == 2) { cout << 1 << endl; return 0; }                                                                          
                                                                                                                        
  vector<int> prime_numbers; // 素数リスト                                                                              
  int c = 1;                                                                                                            
  prime_numbers.push_back(2);                                                                                           
  for (int i = 3; i <= n; i++) {                                                                                        
    bool prime = true;                                                                                                  
    for (vector<int>::iterator itr = prime_numbers.begin(); itr != prime_numbers.end(); itr++) {                        
      if (i % *itr == 0) {                                                                                              
        prime = false;                                                                                                  
        break;                                                                                                          
      }                                                                                                                 
    }                                                                                                                   
    if (prime) {                                                                                                        
      prime_numbers.push_back(i);                                                                                       
      c += 1;                                                                                                           
    }                                                                                                                   
  }                                                                                                                     
  cout << c << endl;                                                                                                    
  return 0;                                                                                                             
} 