#include<bits/stdc++.h>
using namespace std;
int main(){
int s;cin>>s;
  vector<int> v;
  int t=0;
  while(true){
   if(count(v.begin(),v.end(),s)!=0){
   cout<<t+1;
     break;
   }
   v.push_back(s);
    t++;
  if(s%2==0)
    s=s/2;
  else
    s=3*s+1;
  
  }
}