#include<bits/stdc++.h>
using namespace std;
#define ll         long long
#define forn(i, n) for(int i = 0; i < n; i++)
#define fort(i, n) for(int i = 1; i <= n; i++)
#define all(x)     x.begin(), x.end()
#define read(x)    freopen(x, "r", stdin);
#define write(x)   freopen(x, "w", stdout);
#define FastRead   ios_base::sync_with_stdio(0);cin.tie(nullptr);
		   
   // #define xihaad
		   
int main()
{

	#ifdef xihaad
	read("input.txt");
	// write("output.txt");
    #endif
	int t = 1;
	cin >> t;
	while(t--)
		{
            int n;
            cin >> n;
            int c = 0, i = 1;
            while(n > 0)
            {
                n -= i;
                i++;
                c++;

            }
            if(n == -1)
                cout << c + 1 <<endl;
            else
                cout << c << endl;



			
		}

		cerr << "time = " << clock() << " ms" << '\n';
		return 0;
    
            
            
}
