#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <sstream>

#define REP(i,n) for(long (i)=0;(i)<(n);(i)++)
#define FOR(i,a,b) for(long (i)=(a);(i)<(b);(i)++)
#define RREP(i,a) for(long (i)=(a)-1;(i)>=0;(i)--)
#define FORR(i,a,b) for(long (i)=(a)-1;(i)>=(b);(i)--)
#define MOD 1000000007
#define PI acos(-1.0)
#define DEBUG(C) cout<<C<<endl;
#define PII pair<int,int>
#define PDD pair<double,double>
#define PLL pair<long,long>
#define ALL(a) (a).begin(),(a).end()
#define SORT(a) sort((a).begin(),(a).end())
#define RSORT(a) sort((a).begin(),(a).end(),greater<int>())
#define MP(a,b) make_pair(a,b)
#define FORE(a,b) for(auto &&a:b)

typedef long long LL;
typedef unsigned long long ULL;

using namespace std;

template<typename T>
list<T> SieveOfEratosthenes(T a){
    list<T> num,res;
    for(T i=2;i<=a;i++) num.push_back(i);
    for(auto i=num.begin();(*i)*(*i)<=a;){
        T n=*i; res.push_back(*i); i++;
        for(auto j=num.begin();j!=num.end();){
            if(*j%n==0) j=num.erase(j);
            else j++;
        }
    }
    for(auto i=num.begin();i!=num.end();i++) res.push_back(*i);
    return res;
}

int main(void){
	int n;
	while(cin>>n) cout<<SieveOfEratosthenes(n).size()<<endl;
}