program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var T,N, k,a, i:longint;

f1 : text;

begin
Assign(f1, 'WEIGHING.IN');
reset(f1);
readln(f1,T);
for i := 1 to T do begin readln(f1,N);
  a:=1;
k:=0;
  while a*2<=N do begin k:=k+1; a:=a*2; end;
  writeln(k);





end;




end.
