function Main(input){
  const s = parseInt(input);
  var arr = [s];
  
  var flag = true;
  var idx = -1;
  do{
    var _f = f(arr[arr.length - 1]);
    idx = arr.findIndex(elem => elem === _f);
    if(idx < 0){
      arr.push(_f);
    }else{
      flag = false;
    }
  }while(flag)
  
  console.log(arr.length + 1);
}

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

Main(require("fs").readFileSync("/dev/stdin", "utf8"));