def solve(): N=int(input()) ac=1 wa=10**9 for i in range(40): k=(ac+wa)//2 if k*k<=N: ac=k else: wa=k print(ac) return def main(): T=int(input()) for i in range(T): solve() return main()