#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <sstream>
 
using namespace std;
 
int main(){
    int n;
    int nums[100000] = {0};
    while(cin >> n){
        int count = 0;
        int qf = 0;
        int qe = 0;
        for(int i = 2; i <= n; i++){
            bool f = false;
            for(int qe = 0; qe < qf; qe++ ){
                if(i % nums[qe] == 0) {
                    f = true;
                    break;
                }
            }
            if(!f) { count++; nums[qf] = i; qf++; }
        }
        cout << count << endl;
    }
    return 0;
}