//1+2+3+....+n,每一步可以替换成-1,相当于减少了-(i+1),只有相差1不能替换!
//除了一外,一定有可以替换的值,因为步数大于x才停止的.
#include<iostream>
#include<cstdio>
using namespace std;
void solve();
int t;
int x;
int main()
{
cin>>t;
while(t--)
{
scanf("%d", &x);
solve();
}
return 0;
}
void solve()
{
int step=0;
while(step*(1+step)<x*2) step++;
if(step*(1+step)/2-1==x) step++;
cout<<step<<endl;
}