#include <iostream>
using namespace std;

int main() {
  int n;cin>>n;
  int m=1;
  if (n==1||n==2||n==4){   cout<<4;return 0;}
  else 
  {
  while(n!=4) {
    m++;
    if (n%2==0) n /= 2;
    else n = n * 3 + 1;
  }
  }
  cout<<m+3<<endl;
  return 0;
}
