import java.util.*; import java.io.*; import java.math.*; // import java.util.stream.Stream; class Main{ static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static PrintWriter output = new PrintWriter(System.out); static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws IOException{ int t = sc.nextInt(); while(t-->0) { long n = sc.nextLong(); long left = 1; long right = (long)1e9+1; while(right -left > 1) { long mid = (left + right) / 2; if((mid*mid) <= n) left = mid; else right = mid; } output.println(left); } output.flush(); } }