#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
typedef long long int lli;
double EPS = 1e-8;

lli solve(lli n){
    lli total = 2*n*n +8*n;
    lli s = n/2;
    lli rem = 0;
    lli sqrts = ceil(sqrt((long double)s));
    rem += (s-sqrts)*(s-sqrts);
    for(lli i=1; i<sqrts; i++){
        rem += ( s - (s+i-1)/i ) *2;
    }
    return total -rem*8;
}

int main(){
    while(1){
        lli n;
        cin >> n;
        if(n==0) break;
        cout << solve(n) << endl;
    }
    return 0;
}

