program ali;
var i,g,k,l,n :longint;
begin
assign(input,'WEIGHING.IN');reset(input);
read(i);
for l:=1 to i do begin
readln(g);
k:=1;
if g >=2 then
Begin
repeat
begin
g:=g div 2;
k:=k+1;
end;
until g=1;
writeln(k-1);
end;
end;
end.