from math import sqrt t = int(input()) for _ in range(t): n = int(input()) x = int(sqrt(n)) if x * x > n: x -= 1 print(x)