Let's call an array a consisting of n positive (greater than 0) integers beautiful if the following condition is held for every i from 1 to n: either a_i = 1, or at least one of the numbers a_i - 1 and a_i - 2 exists in the array as well.

For example: 

  * the array [5, 3, 1] is beautiful: for a_1, the number a_1 - 2 = 3 exists in the array; for a_2, the number a_2 - 2 = 1 exists in the array; for a_3, the condition a_3 = 1 holds; 
  * the array [1, 2, 2, 2, 2] is beautiful: for a_1, the condition a_1 = 1 holds; for every other number a_i, the number a_i - 1 = 1 exists in the array; 
  * the array [1, 4] is not beautiful: for a_2, neither a_2 - 2 = 2 nor a_2 - 1 = 3 exists in the array, and a_2 ≠ 1; 
  * the array [2] is not beautiful: for a_1, neither a_1 - 1 = 1 nor a_1 - 2 = 0 exists in the array, and a_1 ≠ 1; 
  * the array [2, 1, 3] is beautiful: for a_1, the number a_1 - 1 = 1 exists in the array; for a_2, the condition a_2 = 1 holds; for a_3, the number a_3 - 2 = 1 exists in the array. 



You are given a positive integer s. Find the minimum possible size of a beautiful array with the sum of elements equal to s.

Input

The first line contains one integer t (1 ≤ t ≤ 5000) — the number of test cases.

Then t lines follow, the i-th line contains one integer s (1 ≤ s ≤ 5000) for the i-th test case.

Output

Print t integers, the i-th integer should be the answer for the i-th testcase: the minimum possible size of a beautiful array with the sum of elements equal to s.

Example

Input


4
1
8
7
42


Output


1
3
3
7

Note

Consider the example test:

  1. in the first test case, the array [1] meets all conditions; 
  2. in the second test case, the array [3, 4, 1] meets all conditions; 
  3. in the third test case, the array [1, 2, 4] meets all conditions; 
  4. in the fourth test case, the array [1, 4, 6, 8, 10, 2, 11] meets all conditions. 
import java.io.*;
import java.util.*;

public class findTheArray {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
        public FastReader(String file_name)throws IOException
        {
            br = new BufferedReader(
                new FileReader(file_name));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() { return Integer.parseInt(next()); }

        long nextLong() { return Long.parseLong(next()); }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        
        public int[] nextArray(int n){
            int ar[] = new int[n];
            for(int i=0;i<n;i++)
                ar[i] = this.nextInt();
            return (ar);
        }
    }

   static class OutputWriter{
        BufferedWriter writer;

         public OutputWriter(OutputStream stream){
           writer = new BufferedWriter(new OutputStreamWriter(stream));
         }

         public OutputWriter(String file_name) throws IOException{
           writer = new BufferedWriter(new FileWriter("output.txt"));
         }
       
         public void print(int i) throws IOException {
           writer.write(i);
         }

         public void print(String s) throws IOException {
            writer.write(s);
          }

         public void print(char []c) throws IOException {
            writer.write(c);
         }

         public void println(int i) throws IOException {
           writer.write(i+"\n");
         }

         public void println(long i) throws IOException {
           writer.write(i+"\n");
         }

         public void println(String s) throws IOException {
            writer.write(s+"\n");
          }

         public void println(char []c) throws IOException {
            writer.write(c+"\n");
         }

         public  void close() throws IOException {
            writer.close();
         }

    }
    public static long gcd(long a,long b){
        return(a==0?b:gcd(b%a,a));
    }
    public static long lcm(long a,long b){
        //return (a*b)/gcd(a,b);
        //this is modified to avoid integer overflow by multiplying a*b
        return((a/gcd(a,b))*b);
    }
    public static void initialize_io_redirection()throws IOException{
        try{
            boolean MP = System.getProperty("MY_PC")!=null;
            if(MP){
                fs = new FastReader("input.txt");
                op = new OutputWriter("output.txt");
                System.setOut(new PrintStream(new File("output.txt")));
            }
            else{
                fs = new FastReader();
                op = new OutputWriter(System.out);
            }
       }
       catch(Exception e){
            fs = new FastReader();
            op = new OutputWriter(System.out);
       }
    }
   static FastReader fs;
   static OutputWriter op;
    public static void main(String[] args)throws IOException{
        initialize_io_redirection();
        int t = fs.nextInt();
        while(t-- > 0)
            solve();
        op.close();
    }

    public static void solve()throws IOException{
        int s=fs.nextInt(),l=0;
        for(int i=1;;i+=2){
        	if(s<i)
        		break;
        	s-=i;
        	l++;
        }
        if(s!=0)
        	l++;
        System.out.println(l);
    }
}

