#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define mx 501000
ll arr[mx],cum[mx];
int  main()
{
         ll t;
         cin>>t;
         while(t--)
         {
            ll x,ans=0,i=1;
            cin>>x;
            while(ans<x)
            {
             //   cout<<i<<" "<<ans<<"\n";
                ans=ans+i;
                i++;
            }
            if((ans-x)==1)
            cout<<" "<<i+(ans-x)-1<<"\n";
            else
                cout<<" "<<i-1<<"\n";
         }

}

