import math n = int(input()) li = [int(input()) for i in range(n)] for j in li: x = math.sqrt(j) print(math.floor(x))