import scala.io.StdIn.readInt

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

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