import numpy as np from sys import stdin t, *a = map(int, stdin.read().split()) for i in range(t): print("{}".format(int(np.floor(np.sqrt(a[i])))))