#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
bool flg[N];
int n,sum;
signed main(){
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin>>n;
for(int i=2;i<=n;i++){
if(i==1) continue;
if(flg[i]) continue;
else {
sum++;
for(int j=i+i;j<=N;j+=i){
flg[j] = true;
}
}
}
cout<<sum;
return 0;
}