#include using namespace std; using LL = long long; int main(){ int T; cin >> T; while(T--){ LL n, a, b, c, ans = 0; cin >> n; b = n, a = n / 2, c = n - a; ans += a * c; ans += (a + 1) * a / 2; ans += (b + 1) * b / 2; ans += (c + 1) * c / 2; cout << ans << "\n"; } return 0; }