T = int(input()) for i in range(T): n = int(input()) print(n * (n + 1))