from sys import stdin def main(): input = lambda: stdin.readline()[:-1] T = int(input()) for _ in [0] * T: N = int(input()) n = int(N ** 0.5) + 1 if n * n > N: print(n - 1) else: print(n) main()