object Main {
  import java.util.Scanner

  def readStrings(n: Int)(implicit sc: Scanner): Array[String] = Array.fill(n) { sc.next() }
  def readInts(n: Int)(implicit sc: Scanner): Array[Int] = Array.fill(n) { sc.nextInt() }
  def readLongs(n: Int)(implicit sc: Scanner): Array[Long] = Array.fill(n) { sc.nextLong() }
  def readLineStrings(implicit sc: Scanner): Array[String] = sc.nextLine().split(' ')
  def readLineInts(implicit sc: Scanner): Array[Int] = readLineStrings.map(_.toInt)
  def readLineLongs(implicit sc: Scanner): Array[Long] = readLineStrings.map(_.toLong)

  def main(args: Array[String]): Unit = solve(new Scanner(System.in))

  def solve(implicit sc: Scanner): Unit = {
    val s = sc.nextLong
    def f(n: Long): Long = n match { case ev if ev % 2 == 0 => ev / 2; case _ => 3 * n + 1 }
    val accum = scala.collection.mutable.Set(s)
    var a = 1
    var last = s
    while (true) {
      val next = f(last)
      if (accum.contains(next)) return println(a + 1)
      accum.add(next)
      last = next
      a += 1
    }
  }
}
