let s = Int(readLine()!)

var arr:Array<Int> = [s]

var i = 1
while true{
  if arr[i-1] % 2 == 0{
    arr.append(arr[i-1]/2)
  }else{
    arr.appned(3*arr[i-1]+1)
  }
  
  for j in 0...i-1{
    if arr[j] == arr[i]{
      break
    }
  }
  
  i += 1
}

print(i)