#include<bits/stdc++.h>
#define ll long long int

using namespace std;

int main(){
    ll t,n,i,k,y,z,h,o;
    ll cnt =0,c=1;
   vector<ll>v;
    vector<ll>::iterator it,itt;
   v.push_back(0);

   for(i=1;i<100005;i++){
        cnt+=c;
    v.push_back(cnt);
    c++;

    if(cnt>1000000)
        break;

   }
   cin>>t;
    while(t--){
           cin>>n;
           it=find(v.begin(),v.end(),n);
           if(it!=v.end()){
             k=it-v.begin();
            cout<<k<<"\n";
           }
           else{
             y=upper_bound(v.begin(),v.end(),n)-v.begin();
             if(v[y]-n>1)
            cout<<y<<"\n";
            else
                cout<<y+1<<"\n";

           }

    }
    return 0;
}
