#include<bits/stdc++.h>
using namespace std;
#define mod 100001
#define f(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
#define ll long long
#define pii pair< int,int >
#define pll pair< ll,ll >
int primes[100001]={0};
void seive()
{
  for(int i=0;i<mod;i++)
    primes[i]=1;
  for(int i=2;i*i<=mod;i++)
  {
     for(int j=i*i;j<=mod;j+=i)
      if(primes[j])primes[j]=false;
  }
 primes[0]=primes[1]=false;
}
int arr[1000001];
int main()
{
   long long t=100;
   cin >> t;
   int y=0;
   for(int i=0;i<1000001;i++)
    {
       arr[i]=y+i+1;
       y+=i+1;
    }
    while(t--)
    {
      int dest;
      cin >> dest;
      int curr=0;int k=1;
      while(curr<dest)
      {
          curr+=k;
          k++;
      }
      if(curr-1==dest){cout << k << endl;continue;}
      else
        cout << k-1 << endl;
    }
}


