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

    var flag = 0;
    var count = 1;

    var store = [];
    store.push(N);

    while(1) {
        count += 1;
        if(N % 2 === 0) {
            N = N / 2;
        } else {
            N = 3 * N + 1;
        }
        if(store.indexOf(N) !== -1) {
            console.log(count);
            break;
        } 
        store.push(N);
    }
}

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