#include using namespace std; #define all(v) v.begin(),v.end() using ll = long long; using ull = unsigned long long; using vll=vector; using vvll = vector>; int main(){ ll T; cin >>T; while(T--){ ll a; cin >>a; if(a==2){ cout << 2 << endl; }else{ cout << (a-1)*(a-1) << endl; } } }