object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    var s = sc.nextInt
    var st = Set[Int]()
    var cnt = 1
    while(!st(s)) {
      st += s
      s = calc(s)
      cnt += 1
    }
    println(cnt)


  }
  def calc(x: Int) = {
    if(x%2 == 0)
      x / 2
    else
      x * 3 + 1
  }
}
