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 competitveprogramming;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
  
public class c729a
{
    //By shwetank_verma
	static void buildStree(int a[],ArrayList<Integer> stree,int index,int s,int e,boolean f) {
		if(s>e)
			return;
		if(s==e) {
			stree.set(index, a[s]);
			return;
		}
		int mid=s+(e-s)/2;
		//Left Subtree
		buildStree(a,stree,2*index,s,mid,!f);
		//Right Subtree
		buildStree(a,stree,2*index+1,mid+1,e,!f);
		int left=stree.get(index*2);
		int right=stree.get(index*2+1);
		if(f)
		stree.set(index, (left | right));
		else {
			stree.set(index, (left ^ right));
		}
	}
	static void updateNode(int a[],ArrayList<Integer> stree,int index,int s,int e,int i,int value,boolean f) {
		//no overlap
		if(i<s||i>e) {
			return;
		}
		//complete overlap
		if(s==e)
		{
			stree.set(index,value);
			return;
		}
		//partial overlap
		int mid=s+(e-s)/2;
		updateNode(a,stree,2*index,s,mid,i,value,!f);
		updateNode(a,stree,2*index+1,mid+1,e,i,value,!f);
		if(f)
		stree.set(index, (stree.get(index*2) | stree.get(index*2+1)));
		else {
			stree.set(index, (stree.get(index*2) ^ stree.get(index*2+1)));
		}
		return;
	}
	static void dfs(ArrayList<ArrayList<Integer>> adj,int s,boolean vis[]) {
		vis[s]=true;
		for(int i:adj.get(s)) {
			if(vis[i]==false) {
		    	dfs(adj,i,vis);
			}
		}
	}
	static int connected(ArrayList<ArrayList<Integer>> adj,int v) {
		boolean visited[]=new boolean[v+1];
		int cnt=0;
		for(int i=1;i<v+1;i++) {
			if(!visited[i]) {
				dfs(adj,i,visited);
				cnt++;
			}
		}
		return cnt;
	}
	static int parent[]=new int[1000001];
	static int rank[]=new int[1000001];
	static void intialise() {
		for(int i=0;i<=1000000;i++) {
			parent[i]=-i;
			rank[i]=1;
		}
	}
	static int find(int x) {
		if(parent[x]<0)
		    return x;
	    return parent[x]=find(parent[x]);
	}
	static void union(int x,int y) {
		   int a=find(x);
		   int b=find(y);
		   if(a==b)
		   return;
		   if(rank[a]<rank[b]) {
		   int temp=b;
		   b=a;
		   a=temp;
		   }
		   parent[b]=a;
		   rank[a]+=rank[b];
	}
	static class Point implements Comparable<Point>
	{
	    int x, y;
	    Point(int x, int y)
	    {
	        this.x = x;
	        this.y = y;
	    }
	    
	    // compareTo() function defining the
	    // nature of sorting i.e., according to
	    // x-coordinate
	    public int compareTo(Point P)
	    {
	        return this.x - P.x;
	    }
	}
	public static void main(String[] args)
    {
        FastReader sc=new FastReader();
       
           
                int t=1;
                t=sc.nextInt();
              while(t-->0){
                	int n=sc.nextInt();
                	double val=Math.sqrt(n);
                	val=Math.ceil(val);
                	System.out.println((int)val);
                
                }
         
    }
 
static void ruffleSort(long[] a) {
		int n=a.length;
		Random r=new Random();
		for (int i=0; i<a.length; i++) {
			long oi=r.nextInt(n), temp=a[i];
			a[i]=a[(int)oi];
			a[(int)oi]=temp;
		}
		Arrays.sort(a);
	}
static void ruffleSort(int[] a) {
		int n=a.length;
		Random r=new Random();
		for (int i=0; i<a.length; i++) {
			int oi=r.nextInt(n), temp=a[i];
			a[i]=a[oi];
			a[oi]=temp;
		}
		Arrays.sort(a);
	}
static void ruffleSort(char[] c) {
	int n=c.length;
	PriorityQueue<Character> pq=new PriorityQueue<>();
	for(char cc:c) {
		pq.add(cc);
	}
	for(int i=0;i<n;i++) {
		c[i]=pq.poll();
	}
}
 
    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;
        }
    }
    static int mod=1000000007;
    static boolean primes[]=new boolean[1000007];
    static ArrayList<Integer> b=new ArrayList<>();
    static boolean seive(int n){
        Arrays.fill(primes,true);
        primes[0]=primes[1]=false;
        for(int i=2;i*i<=n;i++){
            if(primes[i]==true){
                for(int p=i*i;p<=n;p+=i){
                    primes[p]=false;
                }
            }
        }
        if(n<1000007){
        	for(int i=2;i<=n;i++) {
        		if(primes[i])
        			b.add(i);
        	}
            return primes[n];
        }
        return false;
        
    }
    static int gcd(int a,int b){
        if(b==0)
        return a;
        return gcd(b,a%b);
    }
    static long GCD(long a,long b){
        if(b==0)
        return a;
        return GCD(b,a%b);
    }
    static ArrayList<Integer> segseive(int l,int r){
    	
    	ArrayList<Integer> isprime=new ArrayList<Integer>();
    	boolean p[]=new boolean[r-l+1];
    	Arrays.fill(p, true);
        
    	for(int i=0;b.get(i)*b.get(i)<=r;i++) {
    		int currprime=b.get(i);
    		int base=(l/currprime)*currprime;
    		if(base<l) {
    			base+=currprime;
    		}
    		for(int j=base;j<=r;j+=currprime) {
    			p[j-l]=false;
    		}
    		
    		
    		if(base==currprime) {
    			p[base-l]=true;
    		}
    		
    	}
    	for(int i=0;i<=r-l;i++) {
    		if(p[i])
    			isprime.add(i+l);
    	}
    	return isprime;
    }
      static int LowerBound(int a[], int x) { // x is the target value or key
  int l=-1,r=a.length;
  while(l+1<r) {
    int m=(l+r)>>>1;
    if(a[m]>=x) r=m;
    else l=m;
  }
  return r;
}
static int UpperBound(int a[], int x) {// x is the key or target value
    int l=-1,r=a.length;
    while(l+1<r) {
       int m=(l+r)>>>1;
       if(a[m]<=x) l=m;
       else r=m;
    }
    return l+1;
 }
 
  
     
}