#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
long long b,ans,last,last1,i,j,k,last2;
int a,c;
int main()
{
freopen("exp.in","r",stdin);
freopen("exp.out","w",stdout);
scanf("%d",&a);
b=trunc(sqrt(a));
for (c=1;c<=b;c++)
{
ans+=a%c;
}
last=a;
while (last!=b)
{
last1+=1;
i=(a/(last1+1))+1;
j=a%last1;
k=last-i+1;
last2=j+(k-1)*last1;
ans+=(last2+j)*k/2;
last=i-1;
}
printf("%lld",ans);
}