import scala.io.StdIn._
import scala.util.control.Breaks._

object Main extends App {
  val s = readInt()

  require(1 <= s && s <= 100)

  var i    = 1
  var j    = 0
  var a    = s
  var list = Seq(a)
  breakable {
    while (i <= 1000000) {
      i = i + 1
      val b = if (a % 2 == 0) a / 2 else 3 * a + 1
      if (list.contains(b)) {
        println(i)
        break()
      }
      list = list.appended(b)
      a = b
    }
  }
}
