#include<bits/stdc++.h>
using namespace std;
const int N=1e8+5;
int n,a[N],p,d,x,s;
bool f[N];
signed main(){
std::ios::sync_with_stdio(0);
cin>>n;
for(int i=2;i<=n;i++){
if(!f[i])a[++p]=i,b[++d]=i,s++;
for(long long j=i*i;j<=p;j++)
{
f[a[j]*i]=1;
if(i%a[j]==0)break;
}
}
cout<<s;
return 0;
}