[code:1]
program t1;
var n:integer;
function count(n:integer):integer;
begin
if n=1 then count:=0 else
if n mod 2=0 then count:=count(n div 2)+1 else
count:=count(n*3+1)+1;
end;
begin
readln(n);
writeln(count(n));
end.