n<=3e6
#include <bits/stdc++.h>
using namespace std;
int const N=4400000;
int n,num,q[N],flag[N],x,e,ans,f[N],anss;
void P(){
for(int i=2;i<=N;++i){
if(flag[i]) q[++num]=i;
for(int j=1;j<=num;++j){
if(q[j]*i>N) break;
flag[i*q[j]]=false;
}
}
}
int main(){
// freopen("2.in","r",stdin);
// freopen("2.out","w",stdout);
scanf("%d",&n);
num=0;memset(flag,true,sizeof flag);P();
memset(f,0,sizeof f);
for(int i=1;i<=num;++i) f[q[i]]=1;
ans=0;
for(int i=2;i<=n;++i){
int x=i;e=1;
anss=ans;
while(1){
if(x%q[e]==0) x/=q[e],ans++;
else e++;
if(f[x]!=0){ans+=f[x];break;}
if(x==1) break;
}
f[i]=ans-anss;
}
//for(int i=2;i<=n;++i) printf("%d:%d ",i,f[i]);
printf("%d",ans);
return 0;
}