t=int(input()) for _ in range(t): n=int(input()) ok=0;ng=n+1; while abs(ok-ng)>1: mid=(ok+ng)//2 if(mid*mid<=n):ok=mid else :ng=mid print(ok)