
var reader = require('readline').createInterface({
 input: process.stdin,
 output: process.stdout
});

var lines = [];
reader.on('line',(line) => {
         lines.push(line);
});

reader.on('close', () => {
         var s = lines[0];
 var a = [s];
 for (var i = 0; i < 1000010; i++){
   if (a[i] % 2 == 0){
    a.push( a[i] / 2 );
   } else {
     a.push( a[i]*3+1 );
   }
   for (var j = 0; j < i;j++){
     if (a[i] == a[j]){
        console.log(i+1);
       return;
     }
   }
 }
});