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

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

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