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
#pragma GCC optimize ("-O2")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
#ifndef ONLINE_JUDGE
#include "debug.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x);
#else
#define deb(x...)
#endif
#define endl "\n"
#define pb push_back
#define int long long int
#define ll long long
#define pii pair<int,int>
#define F first
#define S second
#define mod 1000000007
#define MOD 998244353
#define inf (int)(1e18)
#define all(c) c.begin(),c.end()
#define read(v) for(auto &it:v) cin>>it;
#define print(v) for(auto &it:v) cout<<it<<" ";
#define getunique(a) a.resize(unique(a.begin(),a.end())-a.begin());
const int  N = 2e5 + 5;
namespace number_theory {
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	if (y == 0) return x;
	return gcd(y, x % y);
}
bool isprime(ll n) {
	if (n <= 1) return false;
	if (n <= 3) return true;

	if (n % 2 == 0 || n % 3 == 0) return false;

	for (ll i = 5; i * i <= n; i += 6)
		if (n % i == 0 || n % (i + 2) == 0)
			return false;

	return true;
}

bool prime[15000105];
void sieve(int n) {
	for (ll i = 0; i <= n; i++) prime[i] = 1;
	for (ll p = 2; p * p <= n; p++) {
		if (prime[p] == true) {
			for (ll i = p * p; i <= n; i += p)
				prime[i] = false;
		}
	}
	prime[1] = prime[0] = 0;
}

vector<ll> primelist;
bool __primes_generated__ = 0;

void genprimes(int n) {
	__primes_generated__ = 1;
	sieve(n + 1);
	for (ll i = 2; i <= n; i++) if (prime[i]) primelist.pb(i);
}

vector<ll> factors(ll n) {
	if (!__primes_generated__) {
		cerr << "Call genprimes you dope" << endl;
		exit(1);
	}
	vector<ll> facs;

	for (ll i = 0; primelist[i] * primelist[i] <= n && i < primelist.size(); i++) {
		if (n % primelist[i] == 0) {
			while (n % primelist[i] == 0) {
				n /= primelist[i];
				facs.push_back(primelist[i]);
			}
		}
	}
	if (n > 1) {
		facs.push_back(n);
	}
	sort(facs.begin(), facs.end());
	return facs;
}

vector<ll> getdivs(ll n) {
	vector<ll> divs;
	for (ll i = 1; i * i <= n; i++) {
		if (n % i == 0) {
			divs.push_back(i);
			divs.push_back(n / i);
		}
	}

	getunique(divs);
	return divs;
}
}

using namespace number_theory;


void solve() {
	genprimes(100005);
	int n;
	cin >> n;
	int ans = 0;

	for (int i = 2; i <= n; i++) {
		vector <int> me = getdivs(i);
		int cur = 0;

		for (auto it : me) {
			if (it == 1 || it == i)continue;
			else {
				int current = i / it;
				cur += 2LL * ((current) * (current + 1) - 2);
			}
		}
		ans = max(ans, cur);
	}
	cout << ans << endl;



}
signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int  t = 1;
	//cin >> t;
	while (t--) solve();
	return 0;
}