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