import scala.io.StdIn.readInt

object Main {
  def scan(n:Int, cnt:Int, a:Array[Int]):Int = {
    if(n==1) cnt
    else if(a(n)!=0) a(n)
    else {
      val m = if(n%2==0)n/2 else n*3+1
      a(n) = scan(m,cnt+1,a)
      a(n)
    }
  }

  def main(args:Array[String]) = {
    var n = 0
    while( {n=readInt;n} != 0 ){
      println(scan(n,0,new Array[Int](1000001)))
    }
  }
}