def find_triangle_perimeter(base):
if base % 2 == 0:
# If base is even, the other sides can be base/2 and hypotenuse = base/2 + 1
height = base // 2
hypotenuse = height + 1
return base + height + hypotenuse
else:
# If base is odd, the other sides can be (base-1)/2, (base+1)/2, and hypotenuse = (base+1)/2
height = (base - 1) // 2
hypotenuse = (base + 1) // 2
return base + height + hypotenuse
def main():
T = int(input())
for _ in range(T):
B = int(input())
perimeter = find_triangle_perimeter(B)
print(perimeter)
if __name__ == "__main__":
main()