#include using namespace std; using LL = long long; int main(){ ios::sync_with_stdio(0), cin.tie(0); 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; }