program Project2;
{$APPTYPE CONSOLE}
uses
  SysUtils;

var
  a,b: array[1..100] of integer;
  s: string;
  x,i: integer;
  f: textfile;
begin
AssignFile(f,'stairs.in');
reset(f);
readln(f,s);
x:=strtoint(s);
for i:=1 to x do begin
  readln(f,s);
  a[i]:=strtoint(s);
end;
for i:=1 to x do b[i]:=0;
for i:=1 to x do begin
  while a[i]>b[i] do begin
    b[i]:=b[i]+1;
    a[i]:=a[i]-b[i];
  end;
end;
for i:=1 to x do begin
  s:=inttostr(b[i]);
  writeln(s);
end;
closefile(f);
end.
