function Main(input){
    var arr = [,,input-0];
    for(var i=2;arr[i-2]+arr[i-1]+arr[i]!=7;i++){
        arr.push(arr[i]%2===0?arr[i]/2:3*arr[i]+1);
    }
    console.log(arr.length-1)
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());