import math def solve(n): ok = 0 ng = 10 ** 9 + 100 while abs(ok - ng) > 1: mid = (ok + ng) // 2 if mid * mid <= n: ok = mid else: ng = mid print(ok) t = int(input()) for _ in range(t): solve(int(input()))