var input = require("fs").readFileSync("/dev/stdin", "utf8");
input = parseInt(input)

const ary = [input];

const roop = (num) => {
    const ans = num % 2 === 0 ? num / 2 : 3 * num + 1;
    if (ary.indexOf(ans) !== -1) {
        console.log(ary.length + 1);
    } else {
        ary.push(ans);
        roop(ans);
    }
}

roop(ary[0]);