fun main(array: Array<String>) {
    val s = readLine()!!.toInt()
    var list = mutableListOf<Int>()
    list.add(s)
    var ans = 0
    var temp = 0
    for(i in 1 until 100000) {
        if(list[i-1] % 2 == 0) {
            temp = list[i-1] / 2
        }
        else {
            temp = 3 * list[i-1] + 1
        }
        list.add(temp)
        repeat(i-1) {
            if(temp == list[it]) {
                ans = it
                print(i+1)
                return
            }
        }
    }
}