for t in int(input()): N=int(input()) print([N*(N/2-1),0][N%2])