var
T,N,i,e:longint;
begin
     assign(input,'weighing.in'); reset(input);
     read(T);

      for i:=1 to T do
          begin
          read(N);
          e:=0;
            repeat
            if n mod 2 <> 0 then
            N:=n-1;
            N:=N div 2;
            e:=e+1;
            Until n=1;
            writeln(e);
          end;
end.

