#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e6+7;
int main()
{
	int t;
	cin >> t;
	while(t--)
	{
		int x;
		cin >> x;
		if(x == 1) {
			cout << 1 << endl; continue;
		}
		for(int i=1; i <= 5005; i++){
			if(i*(i+1)/2 == x){
				cout << i << endl; break;
			}
			else if(i*(i+1)/2 > x){
				if(i*(i+1)/2 - x == 1)
					cout << i+1 << endl;
 				else
					cout << i << endl;
				break;
			}
		}
	}
}
