// main.cpp
// CNPIIM
//
// Created by Carl Jalal on 4/11/14.
// Copyright (c) 2014 Carl Jalal. All rights reserved.
//
#include <stdio.h>
#include <cmath>
int main()
{
long answer,T,N,a,d,b,L1,amount;
long n;
float L2;
scanf("%ld",&T);
while (T--) {
scanf("%ld",&N);
amount = 0;
answer = 0;
n=N-N%2;
for (a = 1; a <= n/2; a++) {
d = N-a;
L1 = a*d;
//L2 = sqrt((float)L1);
for (b = 1; b*b < L1 ; b++) {
//printf("%ld %f\n",b,L2);
amount = 2*(((L1-1)/b) - b + 1) - 1;
if (d==a) answer+=amount;
else answer+=2*amount;
}
}
printf("%ld\n",answer);
}
}
Ly8gIG1haW4uY3BwCi8vICBDTlBJSU0KLy8KLy8gIENyZWF0ZWQgYnkgQ2FybCBKYWxhbCBvbiA0LzExLzE0LgovLyAgQ29weXJpZ2h0IChjKSAyMDE0IENhcmwgSmFsYWwuIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi8vCgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPGNtYXRoPgoKaW50IG1haW4oKQp7CiAgICBsb25nIGFuc3dlcixULE4sYSxkLGIsTDEsYW1vdW50OwogICAgbG9uZyBuOwogICAgZmxvYXQgTDI7CiAgICAKICAgIHNjYW5mKCIlbGQiLCZUKTsKICAgIHdoaWxlIChULS0pIHsKICAgICAgICBzY2FuZigiJWxkIiwmTik7CiAgICAgICAgCiAgICAgICAgYW1vdW50ID0gMDsKICAgICAgICBhbnN3ZXIgPSAwOwogICAgICAgIG49Ti1OJTI7CiAgICAgICAgZm9yIChhID0gMTsgYSA8PSBuLzI7IGErKykgewogICAgICAgICAgICBkID0gTi1hOwogICAgICAgICAgICBMMSA9IGEqZDsKICAgICAgICAgICAgLy9MMiA9IHNxcnQoKGZsb2F0KUwxKTsKICAgICAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICBmb3IgKGIgPSAxOyBiKmIgPCBMMSA7IGIrKykgewogICAgICAgICAgICAgICAgLy9wcmludGYoIiVsZCAlZlxuIixiLEwyKTsKICAgICAgICAgICAgICAgIGFtb3VudCA9IDIqKCgoTDEtMSkvYikgLSBiICsgMSkgLSAxOwogICAgICAgICAgICAgICAgaWYgKGQ9PWEpIGFuc3dlcis9YW1vdW50OwogICAgICAgICAgICAgICAgZWxzZSBhbnN3ZXIrPTIqYW1vdW50OwogICAgICAgICAgICAgICAgCiAgICAgICAgICAgIH0KICAgICAgICAgICAgCiAgICAgICAgfQogICAgICAgIAogICAgICAgIHByaW50ZigiJWxkXG4iLGFuc3dlcik7CiAgICB9Cn0=