#include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <complex>
#include <string.h>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <iomanip>
#include <sys/time.h>
#include <tuple>
#include <random>
using namespace std;

#define endl '\n'
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define UNIQ(v) (v).erase(unique((v).begin(), (v).end()), (v).end())

typedef long long ll;
typedef long double ld;
typedef pair<ll, int> P;
typedef vector< vector<ld> > matrix;
struct pairhash {
public:
    template<typename T, typename U>
    size_t operator()(const pair<T, U> &x) const {
	size_t seed = hash<T>()(x.first);
	return hash<U>()(x.second) + 0x9e3779b9 + (seed<<6) + (seed>>2);
    }
};
const int inf = 1e9 + 9;
const ll mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1);

int n;

map<int, ll> m{
    {1,1},
    {100000,60838190672},
    {200000,257212470774},
    {300000,596981215450},
    {400000,1084296609104},
    {500000,1722125036282},
    {600000,2512661322551},
    {700000,3457770622390},
    {800000,4558987534475},
    {900000,5817729717828},
    {1000000,7235062807366},
    {1100000,8812039622862},
    {1200000,10549659220862},
    {1300000,12448845177256},
    {1400000,14510332007222},
    {1500000,16734924755096},
    {1600000,19123138141378},
    {1700000,21675833225770},
    {1800000,24393634293809},
    {1900000,27276821356759},
    {2000000,30326413365285},
    {2100000,33542358268005},
    {2200000,36925459066686},
    {2300000,40476248899052},
    {2400000,44194833598353},
    {2500000,48081994935671},
    {2600000,52138123487538},
    {2700000,56363615930452},
    {2800000,60758384185743},
    {2900000,65323182791149},
    {3000000,70058785460280},
    {3100000,74964555109988},
    {3200000,80041527790312},
    {3300000,85290161753688},
    {3400000,90709780843282},
    {3500000,96301520878991},
    {3600000,102065855149715},
    {3700000,108002269398516},
    {3800000,114111807921375},
    {3900000,120394329084663},
    {4000000,126850549017804},
    {4100000,133479467089246},
    {4200000,140282617787827},
    {4300000,147259491582477},
    {4400000,154411235469265},
    {4500000,161737467121483},
    {4600000,169238102781982},
    {4700000,176913242475822},
    {4800000,184764302482181},
    {4900000,192790925674795},
    {5000000,200992441246692},
    {5100000,209370037656611},
    {5200000,217923890158764},
    {5300000,226653316365413},
    {5400000,235560022983960},
    {5500000,244642548171917},
    {5600000,253902107151677},
    {5700000,263338334303632},
    {5800000,272951354222680},
    {5900000,282742772106696},
    {6000000,292711324081941},
    {6100000,302856699362737},
    {6200000,313180253381239},
    {6300000,323682486495499},
    {6400000,334361760892115},
    {6500000,345219904513529},
    {6600000,356256480873339},
    {6700000,367470747430202},
    {6800000,378864539458650},
    {6900000,390437889429971},
    {7000000,402188826344049},
    {7100000,414118956306590},
    {7200000,426229374669116},
    {7300000,438519040875971},
    {7400000,450987322450746},
    {7500000,463635895079489},
    {7600000,476465015795706},
    {7700000,489473701762655},
    {7800000,502662434241804},
    {7900000,516031076204871},
    {8000000,529581632274134},
    {8100000,543311223215741},
    {8200000,557220889209512},
    {8300000,571311613610574},
    {8400000,585584064718129},
    {8500000,600036645526326},
    {8600000,614670553358276},
    {8700000,629486032479553},
    {8800000,644482906053419},
    {8900000,659661281999214},
    {9000000,675021515919670},
    {9100000,690561394962114},
    {9200000,706285619557381},
    {9300000,722190402701363},
    {9400000,738276491989247},
    {9500000,754546104527913},
    {9600000,770997444637057},
    {9700000,787630213195247},
    {9800000,804447590347769},
    {9900000,821446543739323},
    {10000000,838627288460105},
};


// エラトステネスの篩
bool is_prime[10000000+1];

void sieve(int n) {
    memset(is_prime, true, sizeof(is_prime));
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i <= n; i++) {
        if (is_prime[i]) {
            for (int j = i + i; j <= n; j += i)
                is_prime[j] = false;
        }
    }
}

ll num_divisors(int n) {
    ll res = 1;
    for (int i = 2; i * i <= n; i++) {
        ll k = 0;
        while (n % i == 0) {
            k++;
            n /= i;
        }
        res *= (k + 1);
    }
    if (n != 1) res *= 2;
    return res;
}

ll solve() {
    ll res = 0;
    sieve(n);
    ll s = 0;
    for (auto& v : m) {
        if (v.first < n) {
            s = v.first;
            res = v.second;
        }
    }
    for (ll i = s+1; i <= n; i++) {
        if (is_prime[i]) {
            res += i * 2;
        } else {
            res += i * num_divisors(i);
        }
    }
    return res;
}

void input() {
    cin >> n;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);

    input();
    cout << solve() << endl;
}


Measured memory_bytes: 13440