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

const ary = [parseInt(input, 10)];

for (let current = ary; ;) {
  const next = (current % 2) ? current * 3 + 1 : current / 2;
  if (ary.indexOf(next) !== -1) {
    console.log(ary.length + 1);
    break;
  }
  current = next;
  ary.push(next);
}
