fun main (args : Array<String>) {
	val s = readLine()
	val S : Int = s!!.toInt()
	var list : MutableList<Int> = mutableListOf()
	var i : Int = 0
	list.add(S)
	do {
		if ( (list[i] % 2) == 0 ) {
			list.add(list[i] / 2)
		} else {
			list.add( (list[i] * 3) + 1)
		}
		i++
		
	} while (list.count {it == list[i]} != 2)
	println("${i + 1}")
}