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. 
/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

/* Name of the class has to be "Main" only if the class is public. */


public class Codechef
{
    static int mod=1000000007;
    static FastReader sc=new FastReader();
    
    //input (int)
    static int i() 
    {
    	 return sc.nextInt();
    }
    
    //input (string)
     static String s() {
    	 return sc.next();
    }
    
    //input (long)
    static long l() 
    {
    	 return sc.nextLong();
    }  
    
    //printing ln int
    static void println(int a)
    {
        System.out.println(a);
    }
    
    //printing int
    static void print(int a)
    {
        System.out.print(a+" ");
    }
    
    //printing ln long
    static void println(long a)
    {
        System.out.println(a);
    }
    
    //printing long
    static void print(long a)
    {
        System.out.print(a+" ");
    }
    
    //printing string ln
    static void println(String a)
    {
        System.out.println(a);
    }
    
    //printing String
    static void print(String a)
    {
        System.out.print(a+" ");
    }
    
    //printing array elements(int )
    static void print(int A[]) 
    {
    	for(int i=0;i<A.length;i++)
    		System.out.print(A[i]+" ");
    	System.out.println();
    }
    
     //printing array elements(long)
    static void print(long A[]) 
    {
    	for(int i=0;i<A.length;i++)
    		System.out.print(A[i]+" ");
    	System.out.println();
    }
    
    //printing array elements(String)
    static void print(String A[]) 
    {
    	for(int i=0;i<A.length;i++)
    		System.out.print(A[i]+" ");
    	System.out.println();
    }
    
    
    //taking input in an array of size n(int)
    static int[] input(int n) 
    {
	int A[]=new int[n];
	   for(int i=0;i<n;i++) 
		   A[i]=sc.nextInt();
	   return A;
    }
    
     // taking input in an array of size n(long)
    static long[] inputL(int n) 
    {
	    long A[]=new long[n];
	    for(int i=0;i<n;i++) 
		   A[i]=sc.nextLong();
	    return A;
    }
    
    
    
 
    
    // taking input in array of size n(String)
    static String[] inputS(int n) 
    {
	    String A[]=new String[n];
	    for(int i=0;i<n;i++)
		   A[i]=sc.next();
	   
	    return A;
    }
    
    //array elements to hashmap
    static HashMap<Integer,Integer> hash(int A[])
    {
	    HashMap<Integer,Integer> map=new HashMap<Integer, Integer>();
	    for(int i : A) 
	    {
		    if(map.containsKey(i)) 
			    map.put(i, map.get(i)+1);
		    else
			    map.put(i, 1);
	    }
	    return map;
  }
    
    
    // max(int)
    static int max(int A[]) 
    {
    	int max=Integer.MIN_VALUE;
    	for(int i=0;i<A.length;i++)
    		max=Math.max(max, A[i]);
    	return max;
    }
    
    // max(long)
    static long max(long A[]) 
    {
    	long max=Long.MIN_VALUE;
    	for(int i=0;i<A.length;i++)
    		max=Math.max(max, A[i]);
    	return max;
    }
    
    //min(long)
    static long min(long A[])
    {
    	long min=Long.MAX_VALUE;
    	for(int i=0;i<A.length;i++)
    		min=Math.min(min, A[i]);
    	return min;
    }
    
    // min(int)
    static int min(int A[])
    {
    	int min=Integer.MAX_VALUE;
    	for(int i=0;i<A.length;i++)
    		min=Math.min(min, A[i]);
    	return min;
    }
    
    // sum of (int) elements of an array
    static long sum(int A[]) 
    {
    	long sum=0;
    	for(int i : A) 
    		sum+=i;
    	return sum;
    }
    
    // sum of (long) elements of an array
    static long sum(long A[]) 
    {
    	long sum=0;
    	for(long i : A)
    		sum+=i;
    	return sum;
    }
    
    // copying array elements to another array
    static int[] copy(int A[]) 
    {
    	int B[]=new int[A.length];
    	for(int i=0;i<A.length;i++) 
    		B[i]=A[i];
    	return B;
    }
    
    // reverse an array(long)
    static void reverse(long A[]) 
    {
    	int n=A.length;
    	long B[]=new long[n];
    	for(int i=0;i<n;i++)
    		B[i]=A[n-i-1];
    	for(int i=0;i<n;i++)
    		A[i]=B[i];
    	
    }
    
    // reverse an array(int)
    static void reverse(int A[])
    {
    	int n=A.length;
    	int B[]=new int[n];
    	for(int i=0;i<n;i++) 
    		B[i]=A[n-i-1];
    	for(int i=0;i<n;i++)
    		A[i]=B[i];
    	
    }
    
    

    // prefix sum(long)
    static long [] prefix(long A[]) 
    {
    	long p[]=new long[A.length];
    	p[0]=A[0];
    	for(int i=1;i<A.length;i++)
    		p[i]=p[i-1]+A[i];
    	return p;
    }
    
    // prefix sum(int)
    static long [] prefix(int A[]) 
    {
    	long p[]=new long[A.length];
    	p[0]=A[0];
    	for(int i=1;i<A.length;i++)
    		p[i]=p[i-1]+A[i];
    	return p;
    }

    //suffix sum(long)
    static long [] suffix(long A[]) 
    {
    	long p[]=new long[A.length];
    	p[A.length-1]=A[A.length-1];
    	for(int i=A.length-2;i>=0;i--)
    		p[i]=p[i+1]+A[i];
    	return p;
    }

    //suffix sum(int)
    static long [] suffix(int A[]) 
    {
    	long p[]=new long[A.length];
    	p[A.length-1]=A[A.length-1];
    	for(int i=A.length-2;i>=0;i--)
    		p[i]=p[i+1]+A[i];
    	return p;
    }
    
    //checking if a number is a prime
    static boolean prime(int n) 
    { 
        if (n <= 1) 
            return false; 
        if (n <= 3) 
            return true; 
        if (n % 2 == 0 || n % 3 == 0) 
            return false; 
        double sq=Math.sqrt(n);
  
        for (int i = 5; i <= sq; i = i + 6) 
            if (n % i == 0 || n % (i + 2) == 0) 
                return false; 
        return true; 
    } 
    
    //binary search
    public static int binarysearch(int[] nums,int k)
    {
        int low=0;
        int high=nums.length-1;
        while(low<=high)
        {
            int mid=low+(high-low)/2;
            if(k==nums[mid])
                return mid;
            else if(k>nums[mid])
                low=mid+1;
            else
                high=mid-1;
        }
        return -1;
    }
    
    public static int bs(int[] nums,int k)
    {
        int low=0;
        int high=nums.length-1;
        while(low<=high)
        {
            int mid=low+(high-low)/2;
            if(k==nums[mid])
                return mid;
            else if(k>nums[mid])
                low=mid+1;
            else
                high=mid-1;
        }
        return low;
    }

   



   
   
    
    
    
   
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
 
        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 static void main (String[] args) throws java.lang.Exception
	{
	    int t=i();
	    while(t-->0)
	    {
	        int n=i();
	    
    	        double e=Math.sqrt(n);
    	        int f=(int)e;
    	        if(f==e)
    	            println(f);
    	        else 
    	            println(f+1);
	        
	    }
	    
	  
	    
	}
}
