let s = Int(readLine()!)!

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

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

print(i)
