for i in range(int(input())): n = int(input()) a = int(n**0.5) if a*a <= n < (a+1)*(a+1): print(a) elif n < a*a: print(a-1) else: print(a+1)