#include using namespace std; int main(){ int N; cin >> N; for (int i = 0; i < N; i++){ long long p; cin >> p; cout << (p - 1) * (p - 1) << endl; } }