let s = read_int ()
let a_s = Array.make 1000001 0
let f n = if n mod 2 = 0 then n / 2 else 3 * n + 1
let x, i = ref s, ref 1
let _ = while a_s.(!x) = 0 do a_s.(!x) <- 1; x := f !x; incr i done; Printf.printf "%d\n" !i