import math def solve(n): print(math.floor(pow(n, 0.5) + 10 ** (-10))) t = int(input()) for _ in range(t): solve(int(input()))