#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> fac[N];
int n, vis[N], weight[N];
long long ans;
set<int> s;
void dfs(int v) {
  if (vis[v]) return;
  s.insert(v);
  vis[v] = 1;
  for (int u : fac[v]) dfs(u);
  for (int u = 2 * v; u <= n; u += v) dfs(u);
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; ++i)
    for (int j = 2 * i; j <= n; j += i) {
      fac[j].push_back(i);
      weight[j] += j / i;
    }
  for (int i = 2; i <= n; ++i)
    if (!vis[i]) {
      dfs(i);
      long long res = 0;
      for (auto x : s) {
        res += weight[x];
      }
      ans = max(ans, res);
      s.clear();
    }
  cout << 4 * ans << "\n";
  return 0;
}
