t = int(input()) for _ in range(t): n = int(input()) x = int(n ** 0.5) + 5 while x ** 2 > n: x -= 1 print(x)