
object Main {
    def next(a : Int) = {
        if (a % 2 == 0) a / 2
        else 3 * a + 1 
    }
    def solve(hist : Set[Int], a : Int, n : Int) : Unit = {
        val nxt = next(a)
        if (hist contains nxt) {
            println(n+1)
        } else {
            solve(hist + a, nxt, n+1)
        }
    }
    def main(args: Array[String]) = {
        val sc = new java.util.Scanner(System.in)
        val s = sc.nextInt
        val hist : Set[Int] = Set()
        solve(hist, s, 1)
    }
}