var
t,i,n,p:longint;
begin
assign (input,'WEIGHING.IN'); reset (input);
readln(t);
for i:=1 to t do begin
    readln(n);
    p:=0;
    while n>1 do begin
          n:=n div 2;
          p:=p+1;
          end;
    writeln(p)
    end;
end.