object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)

    val s = sc.nextLong()

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

    val MMAX = 1000000

    def solve(): Int = {
      val A = scala.collection.mutable.Set[Long](s)
      var i = 1
      var a = s
      while (i < MMAX) {
        a = f(a)
        if (A.contains(a))
          return i + 1
        else
          A.add(a)
        i += 1
      }
      -1
    }

    println(solve())
  }

}
