fun main(args: Array<String>) {
  val s = readLine()!!.toInt()
  var mlist = mutableListOf(s)
  var i = 0
  while(true) {
    val v = mlist.get(i)
    if(v%2==0) {
      val div = v/2
      if(mlist.contains(div)){
        println(i+2)
        break
      }
      mlist.add(div)
    } else{
      val mul = v*3 + 1
      if(mlist.contains(mul)){
        println(i+2)
        break
      }
      mlist.add(mul)
    }
    i++
  }
}