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