import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    var pre = sc.nextInt()
    val set = mutableSetOf(pre)
    var m = 2
    while (true) {
        pre = if (pre % 2 == 0) pre / 2 else 3 * pre + 1
        if (set.contains(pre)) {
            println(m)
            break
        }
        set.add(pre)
        m++
    }
}