program STAIRS;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var a1,k,z,n,i:integer;
begin
 assign (input,'Stairs.in');
 reset (input);
 readln(n);
a1:=0;
for i:=1 to n do begin
readln(k);
while k>a1 do
begin
inc(a1);
k:=k-a1;

end;
writeln(a1);
a1:=0;
end;


end.
