const fs = require("fs");
const input = fs.readFileSync("/dev/stdin", "utf8");

const ary = [input];

var current = input;
while (true) {
  var next = (current % 2) ? current * 3 + 1 : current / 2;

  if (ary.findIndex((x) => x === next) !== -1) { 
    console.log(ary.length + 1);
    break;
  }
  current = next;
  ary.push(next);
}
