'use strict'

function Main(input) {
  const lines = input.split('\n').map(Number)
  const S = lines[0]

  const f = n => {
    if (n % 2 === 0) {
      return n / 2
    } else {
      return 3 * n + 1
    }
  }

  let arr = [S]
  for (let i = 1; ; i++) {
    const val = f(arr[i - 1])
    const exists = arr.some(v => v === val)
    if (exists) {
      console.log(i + 1)
      return
    }
    arr[i] = val
  }
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
