function f(n) {
    if (n % 2 == 0) {
        return parseInt(n / 2);
    } else {
        return parseInt(3 * n + 1);
    }
}
function Main(input) {
    input = input.split(" ");
    var s = parseInt(input[0]);
    var n = 1;
    var set = new Set();
    var ai = s;
    set.add(ai);
    var loop = true;
    while (loop) {
        n += 1;

      ai = f(ai);
        if (set.has(ai)) {
            console.log(n);
            return;
        }
        set.add(ai);
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
