let s = read_int ()
let f n = if n mod 2 = 0 then n / 2 else 3 * n + 1
let cs, a = Array.make 1000001 0, Array.make 1000001 0
let _ = a.(1) <- s; cs.(s) <- 1;
  for i = 2 to 1000000 do a.(i) <- f a.(i - 1); if cs.(a.(i)) = 0 then cs.(a.(i)) <- 1 else (Printf.printf "%d\n" i; exit 0) done