#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define SZ(x) ((int)(x).size())
#define rep(i,n) for(int i=0;i<(n);++i)
#define fore(i,a) for(auto &i:a)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})
#define Yes cout << "Yes" << endl;
#define No cout << "No" << endl;
#define ALL(x) (x).begin(),(x).end()
signed _main(); signed main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> using v = vector<T>;
template<class T> using vv = vector<v<T>>;
const int MOD=1e9+7;
const long long INF = 1LL << 60;
using P=pair<int,int>;
/*素数判定*/int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*約数列挙*/vector<int> getDivisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}} return v;}
/*  PrimeFact
init(N): 初期化。O(N log log N)
get(n): クエリ。素因数分解を求める。O(log n)
*/
template <typename T>
struct PrimeFact {
  vector<T> spf;
  PrimeFact(T N) { init(N); }
  void init(T N) { // 前処理。spf を求める
    spf.assign(N + 1, 0);
    for (T i = 0; i <= N; i++) spf[i] = i;
    for (T i = 2; i * i <= N; i++) {
      if (spf[i] == i) {
        for (T j = i * i; j <= N; j += i) {
          if (spf[j] == j) {
            spf[j] = i;
          }
        }
      }
    }
  }
  T get(T n) { // nの素因数分解を求める
    map<T, T> m;
    while (n != 1) {
      m[spf[n]]++;
      n /= spf[n];
    }
    T ret = 1;
    for (auto p : m) {
      ret *= (p.second + 1);
    }
    return ret;
  }
};

signed _main(){
  /*
  ofstream outfile;//出力ストリームを宣言(出力用のオブジェクト)
  outfile.open("1.txt");//出力ストリームをオープン
  */
  int N; cin >> N;
  PrimeFact<int> pf(10000000);

  int tmp=N/100000;
  int cheat[101]={0,60838190672,257212470774,596981215450,1084296609104,1722125036282,2512661322551,3457770622390,4558987534475,5817729717828,7235062807366,8812039622862,10549659220862,12448845177256,14510332007222,16734924755096,19123138141378,21675833225770,24393634293809,27276821356759,30326413365285,33542358268005,36925459066686,40476248899052,44194833598353,48081994935671,52138123487538,56363615930452,60758384185743,65323182791149,70058785460280,74964555109988,80041527790312,85290161753688,90709780843282,96301520878991,102065855149715,108002269398516,114111807921375,120394329084663,126850549017804,133479467089246,140282617787827,147259491582477,154411235469265,161737467121483,169238102781982,176913242475822,184764302482181,192790925674795,200992441246692,209370037656611,217923890158764,226653316365413,235560022983960,244642548171917,253902107151677,263338334303632,272951354222680,282742772106696,292711324081941,302856699362737,313180253381239,323682486495499,334361760892115,345219904513529,356256480873339,367470747430202,378864539458650,390437889429971,402188826344049,414118956306590,426229374669116,438519040875971,450987322450746,463635895079489,476465015795706,489473701762655,502662434241804,516031076204871,529581632274134,543311223215741,557220889209512,571311613610574,585584064718129,600036645526326,614670553358276,629486032479553,644482906053419,659661281999214,675021515919670,690561394962114,706285619557381,722190402701363,738276491989247,754546104527913,770997444637057,787630213195247,804447590347769,821446543739323,838627288460105};

  int cnt=0;
  int ans=cheat[tmp];
  //outfile << ans << ",";
  for(int n=1+tmp*100000;n<=N;n++){
    //cout << n << endl;
    ans+=n*pf.get(n);
    //if(n%100000==0) outfile << ans << ",";
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 81328