T=int(input()) for _ in range(T): n=int(input()) ok=0 ng=1<<30 while ng-ok>1: m=(ok+ng)//2 if m*m<=n: ok=m else: ng=m print(ok)