import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
  	val s = sc.nextInt()
    val list = mutableListOf<Int>()
    var a = s
    var n = 1
    while (a !in list) {
        list.add(a)
        n++
        a = if (a%2 == 0) a/2 else 3*a+1 
    }
    println(n)
}
