/*    Mohammed Sami Khan
                       মোহাম্মদ সামী খান
*/
#include<bits/stdc++.h>
using namespace std;
#define pi acos(-1.0)
#define endl "\n"
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
typedef long long ll;
typedef unsigned long long ull;

bool sortbysecc(const pair<ll,ll> &a, const pair<ll,ll> &b){
    return a.second>b.second;
}


int main()
{
    ll t=1, n, m=0, x, y, i, j, ans;
    cin>>t;
    while(t--){
        cin>>x;
        ll l=0, r=1000000;
        while(l<r){
            m=(l+r)/2;
            n=m*(m+1)/2;
            if(n>=x) r=m;
            else l=m+1;
        }
        n=l*(l+1)/2;
        if(x==n-1) cout<<l+1<<endl;
        else cout<<l<<endl;
        
    }
}

