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 list = [s]
   for (let i = 1;i < 1000000;i++){
     list = c_list(list, s, i)
     var f_list = list.filter(l => l === list[list.length - 1])
     if (f_list.length > 1){
       console.log(i)
       return;
     }
   }
});

const c_list = (list, s, m) => {
    for(let i = list.length;i < m;i++) {
        if(!(list[i - 1] % 2)) {
            list.push(list[i - 1]/2)
        } else {
            list.push(3 * list[i -1] + 1)
        }
     }
    return list
}
 
