"use strict";

function f(x) {
  if (x % 2 === 0) {
    return x/2;
  } else {
    return x * 3 + 1;
  }
}

function main(input) {
  const inputs = input.split("\n").filter(x => x !== "");

  let s = Number(inputs[0]);
  let set = {}

  let current = s;
  let count = 1;
  while(set[current] !== true) {
    set[current] = true;
    current = f(current);
    count++;
  }

  console.log(count);

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
