for i in range(int(input())): n = int(input()) print(0) if n%2 else print(n*(n//2-1))