n=int(input()) ans=0 maxsqrt=0 a=[1]*(n+1) a[0]=0 i=2 while i*i<=n: j=i*i for k in range(j,n+1,j): a[k]=0 i+=1 sums=[0]*(n+1) currsum=0 for i in range(n+1): currsum+=a[i] sums[i]=currsum while (maxsqrt+1)*(maxsqrt+1)<=n: maxsqrt+=1 b=1 while b*b<=n: ans+=(2*b-1)*(sums[n//(b*b)]) b+=1 print(ans)