function myout(text){console.log(text);}//standard output
function Main(input) {
	input = input.trim();
	//input = input.trim().split(" ");
	//input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  input = parseInt(input);
  var list = [input];
  while(true){
    var next = F(list[list.length - 1]);
    if(list.indexOf(next) != -1){
      //myout(list);
       myout(list.length + 1);
      return;
    }else{
      list.push(next);
    }
  }
}

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

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