#include <iostream>
using namespace std;
int f(int a){
  if(a%2 == 0) return a/2;
  else return 3*a+1;
}

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