function main(input) {
  const S = parseInt(input, 10);
  let ary = [];
  let ans;
  
  ary.push(S);
  
  for (let n = 2; ; n++) {
    num = check(ary[n-2]);
    if (ary.includes(num)) {
	  ans = n;
      break;
    } else {
      ary.push(num);
    }
  }
  
  console.log(ans);
}

function check(n) {
  if (n % 2 === 0) {
    return n / 2;
  } else {
    return (3 * n) + 1;
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));