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