#include<iostream>
#include<set>
using namespace std;
int main(){
  int s;cin>>s;
  int ans=2;
  set<int>st;
  st.insert(s);
  while(1){
	if(s%2)s=s*3+1;
	else s/=2;
	if(st.count(s))break;
	st.insert(s);
	ans++;
  }
  cout<<ans<<endl;
}
