program Project7;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var i,n,k,m:integer;
s:real;
begin
assign (input,'stairs.in');
reset (input);
read(m);
for i:=1 to m do
begin
read(k);
n:=1;
while s<=k do
begin
     s:=((2+(n-1))/ 2) *n;
     n:=n+1;
end;
s:=0;
writeln(n-2);
end;

end.
 