fun main(args: Array<String>) {
    fun f(n: Int) = if (n % 2 == 0) n / 2 else 3 * n + 1
    val l = mutableListOf(readLine()!!.toInt())
    for (i in 2..1000000) {
        val r = f(l[l.size - 1])
        if (l.contains(r)) {
            println(i)
            break
        } else l.add(r)
    }
}