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