
//  sasi2.cpp
//  
//
//  Created by DAMPURI on 29/07/20//.
#include<bits/stdc++.h>

using namespace std;
#define ll long long
#define pb push_back
#define pp pop_back
#define endl '\n'
#define INF 4000000000000000000
ll mod=1e9+7;


int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    ll t,res;
    cin>>t;

    while(t--)
    {
        ll n,x,flag=1;
        cin>>n;
        x = sqrt(2*n);
        x++;
       
       while(x*(x+1)>=2*n)
       {
           x--;
           flag=0;
       }
        if(!flag)
        x++;
        if( n - x*(x+1)/2 == -1 )
            x++;
        cout<<x<<endl;
    }
    
}
