#include <iostream>
using namespace std;

int f(int x){
  if(x % 2 == 0){
    return x / 2;
  }else{
    return 3 * x + 1;
  }
}

int main(){
  int s;
  cin >> s;
  int i = 1;
  while(s != 4 && s != 2 && s != 1){
    s = f(s);
    i++;
  }
  cout << i + 3 << endl;
}
