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