function main(s) {
  var i = Number(s);
  var c = 0;
  const numList = [s];
  while (i > 0) {
    c += 1;
    if (i % 2 === 0) {
      i = i / 2;
    } else {
      i = i * 3 + 1;
    }
    if (numList.indexOf(i) >= 0) break;
    numList.push(i);
  }
  console.log(c);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
