using namespace std; int main(){ int n,k=1; cin>>n; while(n!=1){ k++; if(n%2==0) n/=2; else n=3*n+1; } cout<<k; return 0; }