#include <iostream>
#include <stdio.h>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <set>
#include <math.h>
#include <utility>
#include <stack>
using namespace std;
typedef pair<int,int> P;
const int INF = (int)((unsigned int)-1>>1);


int main(){
    int n;
    while(cin >> n){
        vector<int> prime;
        prime.push_back(2);

        for(int i=3;i<=n;i+=2){
            bool is_prime = true;
            for(int j=0;j<prime.size();j++){
                if (i % prime[j] == 0){
                    is_prime = false;
                    break;
                }
            }
            if(is_prime){
                prime.push_back(i);
            }
        }

        cout << prime.size() << endl;
    }

    return 0;
}