28237
 13190
 39914
 81367
 8554
 61106
 67448
 39004
 22308
 16054
 71468
 60501
 100
 300
 59632
 90783
 5611
 1000
 69475
 69753
 10
 5
 582
 8
 36961
 5071
 20
 53213
 92775
 28738
 100000
 92280
 37944
 9
 2627
 7
 3

1028306548 224346172 2054738392 8539207488 94344524 4816051228 5867563092 1962150044 641839188 332342852 6587875268 4721174212 12600 115440 4586497300 10630118936 40580456 1286328 6225539588 6275533596 92 8 434692 52 1762017168 33141852 440 3652070664 11101694484 1065137992 12898363344 10983871880 1856988304 64 8885348 28 0
#include <bits/stdc++.h>
using namespace std;
using namespace std;
int inp;
void sc(long long &x) {
  scanf("%d", &inp);
  x = inp;
}
void sc(long long &x, long long &y) {
  scanf("%d", &inp);
  x = inp;
  scanf("%d", &inp);
  y = inp;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool check(long long A) {
  if (A < 9032) return 1;
  return 0;
}
long long bslrg(long long L, long long R) {
  long long mid, beg = L, en = R;
  while (true) {
    if (en - beg <= 20)
      for (long long i = en; i >= beg; i--)
        if (check(i)) return i;
    mid = (beg + en + 1ll) / 2;
    if (check(mid))
      beg = mid;
    else
      en = mid - 1ll;
  }
  return -1;
}
long long bssml(long long L, long long R) {
  long long mid, beg = L, en = R;
  while (true) {
    if (en - beg <= 20)
      for (long long i = beg; i <= en; i++)
        if (check(i)) return i;
    mid = (beg + en + 1ll) / 2;
    if (check(mid))
      en = mid;
    else
      beg = mid + 1ll;
  }
  return -1;
}
void setbit(int &m, int ind, int val) {
  if (val)
    m = (m | (1 << ind));
  else
    m = (m & ~(1 << ind));
}
bool getbit(int m, int ind) {
  int a = (1 << ind);
  a = (a & m);
  return a;
}
int cntbits(int m) {
  int ret = 0;
  while (m) {
    ret += (m % 2);
    m /= 2;
  }
  return ret;
}
bool smlltr(char c) {
  if (c >= 'a' && c <= 'z') return 1;
  return 0;
}
bool capltr(char c) {
  if (c >= 'A' && c <= 'Z') return 1;
  return 0;
}
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long long mod3 = 1e9 + 9;
long long pow_mod(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2) return (a * pow_mod((a * a) % mod, b / 2)) % mod;
  return pow_mod((a * a) % mod, b / 2);
}
long long n, m, k, L, tmp, maxi, mini, x, y, z, Q, root, sol, r, l, sum;
vector<long long> v[100100];
bool vis[100100];
void dfs(long long node) {
  vis[node] = 1;
  for (int i = 0; i <= v[node].size() - 1; i++) {
    long long son = v[node][i];
    if (!vis[son]) {
      vis[son] = 1;
      sol += gcd(node, son);
      dfs(son);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  if (n < 4) {
    cout << 0;
    return 0;
  }
  for (int i = 2; i <= n; i++) {
    for (int j = 2; j <= 100000; j++) {
      if (i * j > n) break;
      {
        v[i].push_back(i * j);
        v[i * j].push_back(i);
      };
    }
  }
  dfs(2ll);
  cout << sol * 4ll;
  return 0;
}
