"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf8");


var reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on("line", line => {
  let s = parseInt(line);

  let index = 1;
  let arr = [0];
  let num = s;
  while(arr.indexOf(num) == -1) {
    arr.push(num)
    if (num % 2 == 0) {
      num = num / 2;
    } else {
      num = 3 * num + 1;
    }
    index++;
  }
  console.log(index);
});
