from math import factorial def array(idk): if idk == 1: return 1 x = 1 y = 1 xf = 1 yf = 1 t = xf // (yf * (factorial(x - y))) while t != idk: hehe = (x + 1 // 2) + 1 if (x + 1 // 2) + 1 < x else x if y >= hehe: y = 1 x += 1 xf *= x yf = 1 else: y += 1 yf *= y t = xf // (yf * (factorial(x - y))) return x + 1 # Press the green button in the gutter to run the script. if __name__ == '__main__': for i in range(int(input())): print(array(int(input())))