import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int i = 0; i < t; i++) { long n = sc.nextLong(); in: for (long j = (int) (Math.sqrt(n) - 1); j <= n; j++) { if (j * j > n) { System.out.println(j - 1); break in; } } } } }