program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var ij, ii:integer;
v,l,x:longint;

begin
 assign(input,'WEIGHING.IN'); reset(input);
 readln(ii);
 for ij := 1 to ii do begin
readln(v);
l:=0;
while v<>1 do begin
v:= v shr 1;
inc(l);
end;
writeln(l);
   end;
end.
