process.stdin.resume();
process.stdin.setEncoding('utf8');

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

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

reader.on('close', () => {
 var s = Number(lines[0]);
 var info = [];
 info.push(s);
 var num = s;
 var i = 1;
 while(true){
 if(num%2 == 0){
   num = num / 2;
 }else if(num % 2 == 1){
   num = 3*num + 1;
 }
 
 if(info.indexOf(num) != -1){
   console.log(i+1);
   break;
 }else{
   info.push(num);
   i++;
   continue;
 }
}
});