function main(input) {
  var s = parseInt(input.split(" ")[0], 10);
  var arr=[];
  var judge=0;
  var ans=1;
  while(judge==0){
    if(s%2==0){
      s=s/2
    }else{
      s=(3*s)+1
    }
    ans++
    if(arr.indexOf(s)>=0){
      judge++
    }else{
      arr.push(s)
    }
  }
  console.log(ans);

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