program WEIGHING;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var i,n,c:integer;
x:int64;
begin
  reset(input,'WEIGHING.IN');
  //rewrite(output,'output.txt');

  readln(n);

  for i := 1 to n do begin
    readln(x);
    c:=0;

    while x>1 do begin
     x:=(x div 2);
     inc(c);
    end;

    writeln(c);
    end;

end.
