using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp3 { class Program { static void Main(string[] args) { var scanner = new Scanner(); int N = scanner.NextInt(); for (int _ = 0; _ < N; _++) { long P = scanner.NextLong(); Console.WriteLine((P - 1) * (P - 1)); } } } class Scanner { int index = 0; string[] tokens = { }; public string Next() { if (index == tokens.Length) { index = 0; tokens = Console.ReadLine().Split(' '); } return tokens[index++]; } public int NextInt() { return int.Parse(Next()); } public long NextLong() { return long.Parse(Next()); } public double NextDouble() { return double.Parse(Next()); } } }