def solve(): N=int(input()) assert(1<=N<=10**18) ac=1 wa=10**9+1 for i in range(100): k=(ac+wa)//2 if k*k<=N: ac=k else: wa=k print(ac) return def main(): T=int(input()) assert(1<=T<=10**4) for i in range(T): solve() return main()