#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

int main() {
    fastio
	ll n,t,i,j,x,k,m;
    cin>>t;
    
    vector<ll> v;
    v.push_back(0);
    x=0;
    for(i=1;;i++){
        x+=i;
        v.push_back(x);
        if(x>1e6) break;
    }
    
    while(t--){
        cin>>n;
        x=lower_bound(v.begin(),v.end(),n)-v.begin();
        if(n==v[x]-1)cout<<x+1<<endl;
        else cout<<x<<endl;
    }
    
	return 0;
}