let s = Int(readLine()!)!

var arr:Array<Int> = [s]
var a=s
var new:Int
var i=1

while true{
  i+=1
  if a%2==0{
    new=a/2
  }else{
    new=3*a+1
  }
  
  if arr.contains(new){
    break
  }else{
    arr.append(new)
    a=new
  }
}

print(i)
