import scala.io.StdIn._

object Main extends App {

  val s = readInt()

  def solve() = {
    var set = Set.empty[Int]
    var isSearching = true
    var i = 0
    var prev = s
    while(isSearching) {
      if(i != 0) {
        val cur = if(prev % 2 == 0) prev/2 else 3*prev+1
        if(set(cur)) isSearching = false
        else {
          prev = cur
          set += cur
        }
      }
      i += 1
    }
    i
  }

  println(solve())

}

