T=int(input()) for tests in range(T): N=int(input()) x=int(N**0.5) ANS=0 for i in range(max(0,x-10),x+10): if i*i<=N: ANS=i print(ANS)