N=int(input()) for i in range(N): a=int(input()) for j in range(10**10): if j*j>a: print(j-1) break