let s = Int(readLine()!)!

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

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

print(i)
