t = int(input()) for _ in range(t): n = int(input()) m = max(int(n**0.5)-5,1) while True: if (m+1)**2<=n: m+=1 else: break print(m)