#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int i,j,n,count,prime;

    while(cin >> n){
        prime = 0;
        for(i = n;i > 1;i--){
            count = 0;
            for(j = 2;j <= sqrt(i);j++){
                if(i % j == 0){
                    count++;
                }
            }
            if(count == 0){
                prime++;
            }
        }
        cout << prime << endl;
    }
    
    return 0;
}