T = int(input()) def is_lower(x, N): if x ** 2 <= N: return True return False for _ in range(T): N = int(input()) ok = -1 ng = N + 1 while abs(ok - ng) > 1: mid = abs(ok + ng) // 2 if is_lower(mid, N): ok = mid else: ng = mid print(ok)