#include<bits/stdc++.h>
using namespace std;
long long i,j,a[1000000],n,b,c,l,k,s;
int main()
{
  for(cin>>a[i],i=1;i<1000000;i++){
    a[i]=(a[i-1]&1?3*a[i-1]+1:a[i-1]/2);
    for(j=0;j<i;j++)if(a[j]==a[i])return cout<<i+1,0;
  }
}