function main(input) {
	const args = input.split(' ');
	const s = parseInt(args[0], 10);
	var List = [s]
  
	f(s,List)	
}

function f(a,list){
  if(a%2==0) {
    g(a/2,list)
  }else{
    g(3*a+1,list)
  }
}

function g(b,list){
	list.push(b)
 	for(var j = 0;j<list.length;j++){
      if(j == list.length-1) return f(b,list)
      else if(b == list[j]) return console.log(list.length)
    }
}

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