T=int(input()) for i in range(T): N=int(input()) ac=0 wa=10**9+1 for _ in [0]*40: k=(wa+ac)//2 if k*k<=N: ac=k else: wa=k print(ac)