program WEIGHING;
var a,k,n,i,j,l,m:longint;
input:text;
begin
     assign(input, 'WEIGHING.IN');
     reset(input);
     readln(input, a);
     l:=1;
     k:=0;
     j:=0;
                 for i:=1 to a do
                 begin
                 readln(input, k);
                 m:=k;
                 for n:=1 to 30 do
                 begin
                 l:=l*2;
                 if k>=l then j:=j+1;
                 end;
                 l:=1;
                 writeln(j);
                 j:=0;
                 end;
close(input);
end.