for _ in range(int(input())): n = int(input()) print(8 * n)