import scala.io.StdIn.readLine

object Main{
  def f(n : Int): Int ={
    if(n % 2 == 0) n / 2
    else 3 * n + 1
  }
  def solve(s : Int): Int ={
    var lst : List[Int] = List.empty
    var nextInt : Int = s
    var k : Int = 1
    while(!lst.contains(nextInt)){
      lst = nextInt :: lst
      nextInt = f(nextInt)
      k += 1
    }
    k
  }
  def main(args : Array[String]): Unit ={
    val s : Int = readLine().toInt
    println(solve(s))
  }
}
