from decimal import Decimal T = int(input()) for _ in range(T): N = str(input()) print(int((Decimal(N)**Decimal('0.5'))))