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;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, 1, 0, -1};
const int dl[] = {0, 0, 0, -1};
const int dr[] = {0, 0, -1, 0};
int lg(long long x) {
  int res = 0;
  for (int i = 0; i < x; i++) {
    long long GT = (1ll << i);
    if (GT <= x) {
      res = i;
    } else {
      return res;
    }
  }
  return res;
}
long long GCD(long long a, long long b) {
  if (b == 0) {
    return abs(a);
  }
  return GCD(b, a % b);
}
long long sqr(long long x) { return x * x; }
long long nhan(long long a, long long b, long long module) {
  a %= module;
  b %= module;
  long long q = (long double)a * b / module;
  long long r = (a * b - q * module) % module;
  if (r < 0) {
    r += module;
  }
  return r;
}
long long MU(long long a, long long n, long long module) {
  long long res = 1;
  for (; n; n = n >> 1, a = nhan(a, a, module)) {
    if (n & 1) {
      res = nhan(res, a, module);
    }
  }
  return res;
}
void hamZ(string S, int z[]) {
  int n = S.size();
  for (int i = 0; i <= n; i++) {
    z[i] = 0;
  }
  int L = 1, R = 1;
  for (int i = 2; i <= n; i++) {
    if (i <= R) {
      z[i] = min(z[i - L + 1], R - i + 1);
    }
    while (i + z[i] <= n && S[z[i]] == S[i + z[i] - 1]) {
      z[i]++;
    }
    if (i + z[i] - 1 > R) {
      R = i + z[i] - 1;
      L = i;
    }
  }
}
void Sang(int N, int p[]) {
  for (int i = 2; i <= N; i++) {
    p[i] = i;
  }
  for (int i = 2; i <= N; i++) {
    if (p[i] == i) {
      for (int j = i + i; j <= N; j += i) {
        p[j] = i;
      }
    }
  }
}
struct Point {
  long long x, y;
  Point(){};
  Point(long long a, long long b) {
    x = a;
    y = b;
  }
};
const int N = 3e5 + 100;
const double sodu = 1e-9;
const long long oo = 1e18;
const int module = 1e9 + 7;
const int M = 1e9 + 7;
const int NN = (1 << 16);
int n;
void nhap() { cin >> n; }
void solve() {
  bool kt = false;
  for (int i = 2; i < n; i++) {
    if (n % i == 0) {
      kt = true;
    }
  }
  if (!kt) {
    cout << 0;
    return;
  }
  vector<int> VC;
  for (int i = 2; i <= n; i++) {
    if (n % i == 0) {
      VC.push_back(i);
    }
  }
  long long Res = 0;
  for (int x : VC) {
    for (int GT = 2; GT * x <= n; GT++) {
      Res += 1ll * GT * 4;
    }
  }
  cout << Res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  nhap();
  solve();
}
