object Main extends App {
  var s = io.StdIn.readLine().toInt
  def f(x: Int): Int = if(x % 2 == 0) x / 2 else 3 * x + 1
  var seq = Seq[Int]()
  while (!seq.contains(s)) {
    seq ++= Seq[Int](s)
    s = f(s)
  }
  println(seq.length + 1)
}