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