function F(N: integer): integer;
begin
if N = 1 then Result := 0
else Result := 1 + F(N div 2);
end;
var N := ReadInteger();
Write(F(N))
end.
function F(N: integer): integer;
begin
if N = 1 then Result := 0
else Result := 1 + F(N div 2);
end;
begin
var N := ReadInteger();
Write(F(N))
end.