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("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>
using namespace std;
// Header files, namespaces, 
// macros as defined above 
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
/*{{ x | (1 << k) sets the kth bit of x to one
x & ~(1 << k) sets the kth bit of x to zero
x ^ (1 << k) inverts the kth bit of x.
x & (x−1) sets the last one bit of x to zero
x & −x sets all the one bits to zero, except for the last one bit. 
x | (x−1) inverts all the bits after the last one bit.}} SOME BIT MANIPULATION*/
//__builtin_clz(x): the number of zeros at the beginning of the number
//__builtin_ctz(x): the number of zeros at the end of the number
//__builtin_popcount(x): the number of ones in the number
//__builtin_parity(x): the parity (even or odd) of the number of ones
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<ll,ll> pi;
#define INF 1e18
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define MT make_tuple
#define g(a,b) get<a>(b)
#define REP(i,a,b) for(ll i = a; i<=b; i++)
#define REPI(i, a, n)  for(ll i = a; i >= (n); --i)
#define maxe(v) *max_element(v.begin(), v.end())
#define mine(v) *min_element(v.begin(), v.end())
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#define endl "\n"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// DISJOINT SET UNION START
ll fn(ll x,ll rn[]) // finding the component
{
    if(x==rn[x]) // Top of its component
        return x;
    else //making parent node of each node of the component the highest node
        return rn[x]=fn(rn[x],rn);
}
bool un(ll x,ll y,ll rn[],ll sz[])// union of components
{
    x=fn(x,rn);
    y=fn(y,rn);
    if(x==y)// if connected already
        return false;
    if(sz[x]<sz[y])// otherwise connectiing light to heavy by swapping
        swap(x,y);
    sz[x]+=sz[y];
    rn[y]=x;// making parent node;
    return true;
}
//DISJOINT SET UNION END

// SEGMENT TREE START
/*struct data
{
    ll seg;
    ll pref;
    ll suff;
    ll sum;
};
ll merge(ll a,ll b)
{
    return max(a,b);
}*/
ll t[4*200000];
void build(ll a[], ll v, ll tl, ll tr,ll par) 
{
    if (tl == tr) t[v] = a[tl];
    else 
    {
        ll tm = (tl + tr) / 2;
        build(a, v*2, tl, tm,par-1);
        build(a, v*2+1, tm+1, tr,par-1);
        
        if(par%2==1)
        t[v] = (t[2*v]|t[2*v+1]);
        else
        {
            t[v] = (t[2*v]^t[2*v+1]);
        }
        
    }
}
ll query(ll v, ll tl, ll tr, ll l, ll r) 
{
    if(tl>r || tr<l)
    {
        return 0;
    }
    if(tl>=l and tr<=r) return t[v];
    ll tm = (tl + tr) / 2;
    return (query(2*v, tl, tm, l, r)|query(2*v+1, tm+1, tr, l, r));
}
void update(ll v, ll tl, ll tr, ll pos, ll new_val,ll a[],ll par) 
{
    if (tl == tr) 
    {
        t[v]=new_val;
    }
    else 
    {
        ll tm = (tl + tr) / 2;
        if (pos <= tm)
            update(v*2, tl, tm, pos, new_val,a,par-1);
        else
            update(v*2+1, tm+1, tr, pos, new_val,a,par-1);

        if(par%2==1)
        t[v] = (t[2*v]|t[2*v+1]);
        else
        {
            t[v] = (t[2*v]^t[2*v+1]);
        }
    }
}
// SEGMENT TREE END
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll lcm(ll a , ll b){return (a*b)/gcd(a,b);}
ll minsubarraysum(ll a[], ll size) 
{ 
   ll max_so_far = a[0]; 
   ll curr_max = a[0]; 
  
   for (ll i = 0; i < size; i++) 
   { 
        curr_max = max(a[i], curr_max+a[i]); 
        max_so_far = max(max_so_far, curr_max); 
   } 
   return max_so_far; 
}
ll mod=1000000007;
ll power(ll x,ll y,ll p = LLONG_MAX ){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
bool cst(const pair<ll,ll>&a, const pair<ll,ll>&b)
{
    return abs(a.F-a.S)>abs(b.F-b.S);
}
ll MOD=998244353;
ll inv(ll val, ll MODx = MOD) 
{
    return power(val, MODx - 2, MODx);
}
vector <ll> fac, ifac;
void preFac(ll sz) 
{
    fac.resize(sz + 1),
    ifac.resize(sz + 1);
    fac[0] = 1;
    for(int i = 1; i <= sz; i++) 
    {
        fac[i] = (i * fac[i - 1]) % MOD;
    }
    ifac[sz] = inv(fac[sz]);
    for(int i = sz - 1; i >= 0; i--) 
    {
        ifac[i] = ((i + 1) * ifac[i + 1]) % MOD;
    }
}
ll nCr(ll N, ll R)
{
    if(R <= N && R >= 0) {
        return ((fac[N] * ifac[R]) % MOD * ifac[N - R]) % MOD;
    }
    return 0;
}
vector<ll> vec;
void div(ll n) 
{ 
     
    for (int i=2; i<=sqrt(n); i++) 
    { 
        if (n%i==0) 
        { 
             
            if (n/i==i) 
                vec.PB(i);
            else
            {
                vec.PB(i);
                vec.PB(n/i);
            } 
        } 
    } 
} 
vector<ll> pos[200005];
vector<ll> neg[200005];
vector<ll> vis(200005,0);
ll ans;
void dfs(ll t)
{
    vis[t]=1;
    for(auto u:pos[t])
    {
        if(vis[u]==0)
        {
            ans+=4*(max(u/t,t/u));
            dfs(u);
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0);
	cin.tie(0);
    cout.tie(0);
    
    ll n;
    cin>>n;
    set<ll> st;
    REP(i,2,n)
    {
        st.insert(i);
    }
    REPI(j,n,2)
    {
        if(st.empty())
        {
            break;
        }
        ll z=j;
        div(z);
        if(st.count(z)==1)
            st.erase(st.find(z));

        REP(i,0,(ll)vec.size()-1)
        {
            pos[z].PB(vec[i]);
            pos[vec[i]].PB(z);
            
            if(st.count(vec[i])==1)
                st.erase(st.find(vec[i]));

            if(st.empty())
            {
                break;
            }
        }
        vec.clear();
    }
    ans=0;
    dfs(2);
    cout<<ans;

}