import java.util.HashSet


fun f(n: Long): Long {
    return if (n%2==0L) {
        n / 2
    } else {
        3*n + 1
    }
}

fun solve(s: Long): Long? {
    val set = HashSet<Long>()
    var n = s

    set.add(s)
    var i = 2L
    while (true) {
        n = f(n)

        if (set.contains(n))
            return i

        set.add(n)
        i++
    }
}


fun main(args: Array<String>) {
    val s = readLine()!!.toLong()

    println(solve(s))
}