""" Umbrella Queries(2) 想定解 奇数の時は0 偶数の時は、円周角の定理を考えると直径+1点の組み合わせが答えとなる。 """ import sys from sys import stdin T = int(stdin.readline()) #制約チェック assert 1 <= T <= 10**5 for lp in range(T): N = int(stdin.readline()) #制約チェック assert 3 <= N <= 10**9 if N % 2 == 1: print (0) else: print ((N//2) * (N-2))