#include<bits/stdc++.h>
using namespace std;
void solve(){
long long n;
cin>>n;
double long sum = (n*n + 1) / 2.0 * n;
cout<<(long long)sum<<endl;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
// freopen("input.txt", "r", stdin);
int t = 1;
cin>>t;
while(t--)
solve();
}