import decimal T = int(input()) for t in range(T): N = decimal.Decimal(input()) print(int(N.sqrt()))