program stairs;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 f:text;
 i,j:integer;
 k,a,n,t:int64;
begin
 assignfile(f,'stairs.in');
 reset(f);
 readln(f,n);
 t:=0;
 for i:=1 to n do begin
  readln(f,k);
  a:=k;
  for j:=1 to k do begin
   if (a-j)>=0 then t:=t+1;
   a:=a-j;
  end;
  writeln(t);
  t:=0;
  end;
 
 closefile(f);
end.
