#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) \
    for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) \
    for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define VREP(s, ite) for (auto ite = s.begin(); ite != s.end(); ++ite)
#define FI first
#define SE second
#define ALL(v) v.begin(), v.end()
//#define endl "\n"
#define ciosup  \
    cin.tie(0); \
    ios::sync_with_stdio(false);
#define eb emplace_back
#define vint vector<int>
constexpr ll INF = 1e15 + 7LL;
constexpr ll MOD = 1e9 + 7LL;
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
    for (int i = 0; i < v.size(); ++i) {
        is >> v[i];
    }
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    for (int i = 0; i < v.size() - 1; ++i) {
        os << v[i] << " ";
    }
    if (v.size() > 0) {
        os << v[v.size() - 1] << endl;
    }
    return os;
}

void dfs(vector<unordered_map<ll, int>>& mas, vll& dp, ll now, ll n){
    if (now == 1) return;
    if (dp[now] != -1) return;
    for (ll i = 2; i * i <= now; ++i) {
        if (now % i == 0){
            //cout << now<<" " << i << endl;
            dfs(mas, dp, now / i, n);
            mas[now] = mas[now / i];
            ++mas[now][i];
            return;
        }
    }
    mas[now][now] = 1;
}

void dfs2(vll& dp, vll& plist, int nowind, int nownum, ll nowtmpval, ll n){
    if (nowind == plist.size()){
        dp[nowtmpval] = (nownum == 1 ? 2 :nownum);
        return;
    }

    dfs2(dp, plist, nowind + 1, nownum, nowtmpval, n);
    nowtmpval *= plist[nowind];
    int cnt = 2;
    while (nowtmpval <= n) {
        dfs2(dp, plist, nowind + 1, nownum*cnt, nowtmpval, n);
        nowtmpval *= plist[nowind];
        ++cnt;
    }
}

int main() {
    ll n;
    cin >> n;

    ll ans = 0;
    FOR(i, 1, n+1){
        ans += i;
    }
    //cout << ans << endl;
    vector<bool> primes(n + 1, true);
    FOR(i, 2, n+1){
        //if (primes[i]){
            ans += i;
            ll now = i + i;
            while (now <= n){
                ans += now;
                //primes[now] = false;
                now += i;
            }
        //}
    }
    cout << ans << endl;

    // vll plist;
    // FOR(i, 2, n + 1) {
    //     if (primes[i]){
    //         //cout << i << " ";
    //         plist.push_back(i);
    //     }
    // }
    // vll dp(n + 1, 2);
    // dfs2(dp, plist, 0, 1, 1, n);
    // dp[1] = 1;
    // //cout << dp << endl;

    // /*
    // vector<unordered_map<ll, int>> mas(n + 1);
    // //mas[1][1] = 1;
    // IFOR(i, 2, n + 1) { dfs(mas, dp, i, n); }
    // dp[1] = 1;
    // FOR(i,2,n+1){
    //     ll tmp = 1;
    //     for (auto elem: mas[i]){
    //         //cout << i << " " << elem.first << " " << elem.second << endl;
    //         tmp *= (elem.second + 1);
    //     }
    //     dp[i] = tmp;
    // }*/
    // ll ans = 0;
    // FOR(i, 1, n+1) { ans += i * dp[i]; }
    // cout << ans << endl;
    //cout << dp << endl;
}

Measured memory_bytes: 4572