#include using namespace std; long long t, n; int main(){ ios::sync_with_stdio(0), cin.tie(0); cin >> t; while(t--){ cin >> n; cout << (2 + 2 * n) * n / 2 << '\n'; } return 0; }