"use strict";
const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(" ");
const s = parseInt(input[0]);

let list = [];
let t = s;
for(let i = 2; ; i++){
  list.push(t);
  if(t % 2 === 0){
    t = t / 2;
  }else{
    t = 3 * t + 1;
  }
  if(list.indexOf(t) >= 0) {
    console.log(i);
    break;
  }
}


