program WEIGHING;
{$APPTYPE CONSOLE}
var a,b,c,d,e,f,g,i,j:longint;
var x:real;
input:text;
begin
     g:=1;
     e:=0;
     assign(input, 'WEIGHING.in');
     reset(input);
     readln(input, a);
     for i:= 1 to a do
     begin
     readln(input, b);
     c:=b;
     for j:=2 to 31 do
     begin
     g:=g*2;
     if b>=g then e:=e+1;
     end;
     writeln(e);
     g:=1;
     e:=0;
     end;
     close(input);
     end.
