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

function main(input) {
  let a = Number(input)
  const set = new Set()
  set.add(a)

  let i = 1
  while (true) {
    i++
    let tmp = f(a)
    // console.log(tmp)

    if (set.has(tmp)) {
      console.log(i)
      return i
    } else {
      a = tmp
      set.add(tmp)
    }
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))