program idomi_seka;
  const M = 300;
  var p, kiek: longint;
begin
  readln (p);
  kiek := 1;
  while (p <> 1) and (kiek < M) do
    begin
      if p mod 2 = 0
         then p := p div 2
         else p := 3*p + 1;
      kiek := kiek + 1;
    end;
  if p <> 1
     then writeln ('Nepasiekta sekos pabaiga')
     else writeln (kiek);
end.
