#include<cstdio>
#include<iostream>
#define ll long long
using namespace std;

int main(){
	ll n;
	cin>>n;
	ll sum=0;
	for(ll l=1,r;l<=n;l=r+1){
		r=n/(n/l);
		sum+=(n/l)*(r-l+1);
	}
	cout<<sum<<endl;
	return 0;
}