import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;

void main ()
{
	auto tests = readln.strip.to !(int);
	foreach (test; 0..tests)
	{
		auto x = readln.strip.to !(int);
		int step = 0;
		int pos = 0;
		while (pos < x)
		{
			step += 1;
			pos += step;
		}
		writeln (step + (pos - x == 1));
	}
}
