using namespace std;
#define ll long long int
#define tamom_shod_lanati false 
#include <algorithm>
#include <iterator>
#include <iostream>
#include <sstream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <map>
#include <set>
const int sh = 10000000; 
map <ll, ll> mp; bool is;
pair<int, int> tok; ll ar[sh];
set <ll> st; set<ll>::iterator it;
set<char, greater<char> > st2;
vector< pair <ll, ll> > vec;
bool sortbysec(const pair<int, int>& a,
	const pair<int, int>& b){
	return (a.second < b.second);
}

int main() {
	std::ios_base::sync_with_stdio(false);
	ll a = 0, b = 0, c, d, x = 0, y = 0, z = 0, num, ans = 2, sum = 0, cnt, n, m, k = 100000200, r, t;
	string s1, s2, s3, s4; char ch, ch2;
	cin >> num;
	for (ll i = 1; i <= num; i++) {
		cin >> n;
		for (ll j = 1; j <= n+10; j++) {
			x += j;
			if (x > n) {
				if (x - n == 1) {
					cout << j + 1 << endl;
					break;
				}
				else {
					cout << j << endl;
					break;
				}
			}
			if (x == n) {
				cout << j << endl;
				break;
			}
		}
		x = 0;
	}

	return tamom_shod_lanati;
}
/*
_____________________________________________________________________________
--------------------------------------------/\----------/\--------/\---------|
-------------------------------------------/  \--------/  \------/  \--------|
------------------------------------------/____\------/    \----/    \-------|
-----------------------------------------/      \----/      \--/      \------|
----------------------------------------/        \--/        \/        \INOOR|
_____________________________________________________________________________|

*/
