function main(input) {
  var s = input[0]-0;
  var map = {};
  map[s] = true;
  var ans = 1;
  while(true){
    ans++;
    var nex = next(s);
    if(map[nex]) break;
    map[nex] = true;
    s = nex;
  }
  console.log(ans);
}
function next(n){
  if(n%2==0) return n/2;
  else return 3*n+1;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
