// clang-format off
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#ifndef kaalanamak
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif

#define int long long
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef gp_hash_table<int, int> umap;
typedef tree<int, null_type, less<int>, rb_tree_tag,
        tree_order_statistics_node_update> oset;
// not that imp
typedef pair<pii, int> piii;
typedef vector<int> vi;
#define vl vector <long long>
typedef vector<vi> vii;
#define vll vector <vl>
#define vd vector <double>
#define vp vector <pii>
#define INF 200000000000000
#define MOD 998244353
#define MOD2 998244353 
#define EPS 1e-7
const int MAXN= 1e5+5;
// const int MAXN= 3;
#define PI 3.1415926535897932385
// #define PI acos(-1)

#define pb push_back
#define bitc __builtin_popcountll
#define mp make_pair
#define ff first
#define ss second
#define all(ar) ar.begin(), ar.end()
#define sz(x) (int)(x).size()

#define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define rep(i, n) for (int i = 0, _n = (n); i < _n; i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define frr(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)
#define foreach(it, ar) for (auto it = ar.begin(); it != ar.end(); it++)
#define fil(ar, val) memset(ar, val, sizeof(ar))  // 0x7f for inf, 0x80 for -INF

#define Max(a,b,c) max(a,max(b,c))
#define Min(a,b,c) min(a,min(b,c))

#ifdef kaalanamak
template<typename T>
void __p(T a) { cout << a << " "; }
template<typename T>
void __p(std::vector<T> a) { cout << "{ "; for (auto p : a) __p(p); cout << "}"; }
template<typename T, typename F>
void __p(pair<T, F> a) { cout << "{ "; __p(a.first); __p(a.second); cout << "}"; }
template<typename T, typename ...Arg>
void __p(T a1, Arg ...a) { __p(a1); __p(a...); }
template<typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
    cout<<name<<" : ";__p(arg1);cout<<endl;
}
template<typename Arg1, typename ... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args) {
    int bracket=0,i=0;
    for(; ;i++)
        if(names[i]==','&&bracket==0)
            break;
        else if(names[i]=='(')
            bracket++;
        else if(names[i]==')')
            bracket--;
    const char *comma=names+i;
    cout.write(names,comma-names)<<" : ";
    __p(arg1);
    cout<<"| ";
    __f(comma+1,args...);
}
#define trace(...) cout<<"Line:"<<__LINE__<<" "; __f(#__VA_ARGS__, __VA_ARGS__)
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif

ll gcd(ll a, ll b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b%a, a); 
} 

ll power(ll x, unsigned int y, unsigned int m) 
{ 
    if (y == 0) 
        return 1; 
    ll p = power(x, y/2, m) % m; 
    p = (p * p) % m; 
  
    return (y%2 == 0)? p : (x * p) % m; 
} 
ll modpow(ll b, ll e) {
    ll ans=1; for(;e;b=b*b%MOD,e/=2) if(e&1) ans=ans*b%MOD; return ans; }
ll modInverse(ll a, ll m) 
{ 
    ll g = gcd(a, m); 
    if (g != 1) 
        return -1; 
    else
    { 
        // return power(a, m-2, m); 
        return modpow(a,m-2); 
    } 
} 
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
inline bool equals(double a, double b) { return fabs(a - b) < 1e-9; }

ll n,m,sum,k,l,r,a,b,lcm,h,c,d,x;
//never use return while cin-ning
void solve() {
    cin>>n;
    vi primes(4000,0);
    vi smfac(10000002,-1);
    for(int i=2;i<4000;i++){
        if(primes[i]==0){
            smfac[i]=i;
            for(int j=i*i;j<=10000000;j+=i){
                if(j<4000)primes[j]=1;
                if(smfac[j]=-1)smfac[j]=i;
            }
        }
    }
    smfac[1]=1;
    sum=1;
    for(int i=2;i<=n;i++){
        int cnt=0,tmp=i;
        // if(i%100==0)cout<<i<<"\n"<<flush;
        if(smfac[i]==-1)smfac[i]=i;
        while(tmp%smfac[i]==0){
            cnt++;
            tmp/=smfac[i];
        }
        sum+=(cnt+1)*smfac[tmp]*i;
        smfac[i]=(cnt+1)*smfac[tmp];
        // trace(smfac[i],cnt,tmp);
    }
    cout<<sum<<"\n";
}
signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0), cout.precision(15);  // cout<<fixed;
#ifdef kaalanamak
    // cin.exceptions(cin.failbit);
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int t=1;
    // cin>>t;
    int i=1;
    while(t--){
        // cout<<"Case #"<<i++<<": ";
        solve();
    }
    end_routine();
}

Measured memory_bytes: 81356