//#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; //#define int long long typedef long long ll; typedef unsigned long long ul; typedef unsigned int ui; constexpr ll mod = 998244353; const ll INF = mod * mod; typedef pairP; #define rep(i,n) for(int i=0;i=0;i--) #define Rep(i,sta,n) for(int i=sta;i=1;i--) #define Rep1(i,sta,n) for(int i=sta;i<=n;i++) #define all(v) (v).begin(),(v).end() int main(){ ll t; cin >> t; for (int i = 0; i < t; i++){ ll n; cin >> n; if (n & 1){ cout << 0 << endl; } else { cout << n * (n - 2) / 2 << endl;; } } }