import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val s = sc.nextInt()

    var set = Set.empty[Int]
    set = set + s
    var bef = s

    for (i <- 1 to 1000000) {
      val j = f(bef)
      if (set.contains(j)) {
        println(i+1)
        sys.exit(0)
      } else {
        set = set + j
        bef = j
      }
    }
  }

  def f(n: Int): Int = {
    if (n % 2 == 0) n / 2
    else 3 * n + 1
  }
}
