#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int setPrimeNumberCount(int n) {
    int count = 0;
    vector<int> primeList;
    vector<int> searchList;
    
    if(n >= 2){
        for(int i = 2; i <= n; i++) {
            searchList.push_back(i);
        }
        
        vector<int>::iterator end_it;
        
        for(int i = 0; i <= n; i++) {
            primeList.push_back(searchList[0]);
            
            for(vector< int >::iterator it = searchList.begin(); it != searchList.end();) {
                if(*it % primeList[count] == 0) {
                    it = searchList.erase(it);
                }
                else {
                    ++it;
                }
            }
            count++;
            if(pow(primeList[i],2) > searchList.back()) {
                for(int i = 0; i < searchList.size(); i++) {
                    primeList.push_back(searchList[i]);
                    count++;
                }
                break;
            }
        }
    }
    return count;
}

int main(void) {
    int n;
    int count = 0;
    
    while(cin >> n) {
        count = setPrimeNumberCount(n);
        cout << count << endl;
        count = 0;
    }
    return 0;
}