#include <iostream>
#include <iomanip>

using namespace std;


int main(int argc, const char * argv[]) {
    // insert code here...
    
    int maxNumber;
    int countPrime=0;
    bool judgePrime = true;
    
    cin >> maxNumber;
    
    for(int i=2; i<=maxNumber;i++){
        for(int j=2; j<i;j++){
            if(i%j==0){
                judgePrime = false;
            }
        }
        if(judgePrime){countPrime++;}
        judgePrime = true;
    }
    cout << countPrime;
    
    return 0;
}
