var num = +(require('fs').readFileSync('/dev/stdin', 'utf8').trim());
var ends = (n) => { return n >> 1; };
var odds = (n) => { return 3 * n + 1; };
var r = [num];
while (true) {
  num = (num % 2 == 0 ? ends(num) : odds(num));
  if (r.lastIndexOf(num) > -1) {
    break;
  }
  r.push(num);
}
console.log(r.length + 1);