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