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;
long long spf[100001];
long long gcd(long long a, long long b);
long long palindrome(string s);
long long modexp(long long a, long long b, long long m);
void sieve();
long long ceil(long long a, long long b);
vector<long long> getFactorization(long long x);
void getZarr(string str, long long Z[]);
vector<long long> prefix_function(string s);
vector<pair<long long, long long> > factorize(long long n) {
  vector<pair<long long, long long> > v;
  int count = 0;
  while (!(n % 2)) {
    n >>= 1;
    count++;
  }
  if (count) v.push_back(make_pair(2, count));
  for (long long i = 3; i <= sqrt(n); i += 2) {
    count = 0;
    while (n % i == 0) {
      count++;
      n = n / i;
    }
    if (count) v.push_back(make_pair(i, count));
  }
  if (n > 2) v.push_back(make_pair(n, 1));
  return v;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> v;
  for (long long i = 1; i * i <= n; i++) {
    if (i != 1) {
      if (n % i == 0) {
        if (i * i == n)
          v.push_back(i);
        else
          v.push_back(i), v.push_back(n / i);
      }
    }
  }
  long long ans = 0;
  for (auto x : v) {
    for (long long i = 2 * x; i <= n; i = i + x) {
      ans = ans + (i / x) * 4;
    }
  }
  cout << ans << endl;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a % b, b);
  return gcd(a, b % a);
}
long long palindrome(string s) {
  long long l = 0;
  long long h = s.length() - 1;
  while (h > l) {
    if (s[l++] != s[h--]) {
      return 0;
    }
  }
  return 1;
}
long long modexp(long long a, long long b, long long m) {
  if (b == 0) return 1;
  long long temp = modexp(a, b / 2, m);
  temp = (temp * temp) % m;
  if (b & 1) return (temp * (a % m)) % m;
  return temp;
}
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 100001; i++) spf[i] = i;
  for (long long i = 4; i < 100001; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 100001; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 100001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
vector<long long> getFactorization(long long x) {
  vector<long long> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
long long ceil(long long a, long long b) { return a / b + (a % b != 0); }
void getZarr(string str, long long Z[]) {
  long long n = str.length();
  long long L, R, k;
  L = R = 0;
  for (long long i = 1; i < n; ++i) {
    if (i > R) {
      L = R = i;
      while (R < n && str[R - L] == str[R]) R++;
      Z[i] = R - L;
      R--;
    } else {
      k = i - L;
      if (Z[k] < R - i + 1)
        Z[i] = Z[k];
      else {
        L = i;
        while (R < n && str[R - L] == str[R]) R++;
        Z[i] = R - L;
        R--;
      }
    }
  }
}
vector<long long> prefix_function(string s) {
  long long n = (long long)s.length();
  vector<long long> pi(n);
  for (long long i = 1; i < n; i++) {
    long long j = pi[i - 1];
    while (j > 0 && s[i] != s[j]) j = pi[j - 1];
    if (s[i] == s[j]) j++;
    pi[i] = j;
  }
  return pi;
}
