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