#include<bits/stdc++.h>

using namespace std;

#define fr(i,j,k)                   for(long long i=j; i<k; i++)
#define rfr(i,j,k)                  for(long long i=j; i>=k; i--)
#define fritr(it,l)                 for(auto it = l.begin(); it!=l.end(); it++)
#define mp                          make_pair
#define pb                          push_back
#define PR                          1000000007
// #define PR 
#define pi                          3.14159265358979
#define imax                        INT_MAX
// intmax = 2 e 9 
#define DEBUG(x)                    cout << '>' << #x << ':' << x << endl;

typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
typedef unsigned long long ull;

struct trip{ ll a,b,c;};


int main()
{
    ll test=1;
    cin>>test;
    while(test--)
    {
        ll s,k, ans=1,count_it=0,len=0;
        bool flag=false;
        cin>>s;
        if(s==1){
            cout<<1<<endl;
            continue;
        }
        int root = sqrt(s);
        ans+=root;
        s = s - root*root;
        if(s==0) ans = ans-1;
        cout<<ans<<endl;
    }
    return 0;
}