#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ff first
#define ss second

void solve()
{ 
   int n;
   cin>>n;

   int sum=0;
   int cnt=1;

   while(sum<n)
   {
     sum+=cnt;
     cnt+=1;
   }
   if(sum-1==n)
    cout<<cnt;
  else
    cout<<cnt-1;
  cout<<"\n";
  

}
  
 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
       freopen("input.txt","r",stdin);
       freopen("output.txt","w",stdout);
     #endif
    int q=1;
    cin>>q;
  
  while(q--)
  {
       solve();
 
  }
 
  return 0;
         
}