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