#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
const int INF = 1e9 + 9;
const int B = 1e9 + 7;
long long p[N], s[N];
int fp(int first) {
  return first == p[first] ? first : p[first] = fp(p[first]);
}
void u(int a, int b, int d) {
  s[fp(a)] += 4 * d;
  if (fp(a) == fp(b)) return;
  s[fp(b)] += s[fp(a)];
  p[fp(a)] = fp(b);
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> a(n + 1);
  long long ans = 0;
  for (int i = int(2); i <= int(n); ++i) p[i] = i, s[i] = 0;
  for (int i = int(n); i >= int(2); --i)
    for (int j = 2; i * j <= n; ++j) u(i, i * j, j);
  for (int i = int(2); i <= int(n); ++i) ans = max(ans, s[fp(i)]);
  cout << ans << "\n";
  return 0;
}
