#include <iostream>
#include <string>
#include <sstream>
#include <ctype.h>
#include <map>
#include <vector>
#include <utility>
#include <algorithm>

#include<math.h>

using namespace std;

template <typename T>
void printv(vector<T> v){
    for(auto i = v.begin();i != v.end(); ++i ){ cout << *i << endl;}
}


int main()
{
    int t;

    double p;

    double j;

    int k;











    cin >> t;
    int a[4];

    for(int i = 0;i < t;++i){
        cin >> p;

        p = sqrt(p);

        if(modf(p, &j) == 0.0){

            cout.precision(0);
            cout << fixed;
            cout << p << endl;

            //a[i] = p;


        }

        else{
            k = p;
            k++;

            cout << k << endl;

            //a[i] = k;
        }




    }

//    for(int i = 0;i < t; ++i){
//        cout << a[i] << endl;
//    }

    return 0;

}
























