#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; long long ans = 0; ans += 1LL * n * (n + 1) / 2; int m = n / 2; ans += 1LL * m * (m + 1) / 2; ans += 1LL * (n - m) * (n - m + 1) / 2; ans += 1LL * m * (n - m); cout << ans << '\n'; } }