import scala.io.{StdIn => in}
import scala.collection.{mutable => mu}

object Main extends App {
  val s = in.readInt
  val fEvn = (n:Int) => n / 2
  val fOdd = (n:Int) => 3 * n + 1

  def solve(s:Int):Int = {
    val set = mu.HashSet.empty[Int]
    def rec(acc:Int, i:Int):Int = {
      if(set.contains(acc)) i-1
      else {
        set += acc
        val n = if(acc % 2 == 0) fEvn(acc) else fOdd(acc)
        // println(n)
        rec(n, i+1)
      }
    }
    rec(s, 2)
  }

  val ans = solve(s)
  println(ans)
}