import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val s = sc.nextInt()

  println(abc116b(s))
}

private fun abc116b(s: Int): Int {
  val set = mutableSetOf<Int>()
  set.add(s)

  var tmp = f(s)
  var count = 1
  while (!set.contains(tmp)) {
    set.add(tmp)
    tmp = f(tmp)
    count++
  }

  return count + 1
}

private fun f(n: Int): Int {
  if (n % 2 == 0) return n / 2

  return 3 * n + 1
}
