fun main(args: Array<String>) {
    abc116b()
}

fun abc116b() {
    val s = readLine()!!.toLong()

    val list = arrayListOf(s)
    var i = 1
    while (true) {
        val before = list[i++ - 1]
        val curr = if (before % 2 == 0L) before / 2 else 3 * before + 1

        if (list.contains(curr)) return println(i)

        list.add(curr)
    }
}
