#include<bits/stdc++.h>
using namespace std;

void solve(){
    int s;
    cin >> s;
    int sum = 1;
    int currentNum = 2;
    int turna = 1;
    while(sum < s){
        sum += currentNum;
        currentNum += 2;
        turna += 1;
    }
    sum = 0;
    currentNum = 1;
    int turnb = 0;
    while(sum < s){
        sum += currentNum;
        currentNum += 2;
        turnb += 1;
    }
    cout << min(turna, turnb) << endl;
}
int main(){
    int t;
    cin >> t;
    while(t--){
        solve();
    }
}