#include <bits/stdc++.h>
using namespace std;

int main() {
  int s;
  cin>>s;
  set<int> st;
  int cnt=1;
  while(true){
    auto r = st.insert(s);
    if(!r.second){
      cout<<cnt;
      break;
    }
    cnt++;
    if(s%2==0)s/=2;
    else s=s*3+1;
  }
  return 0;
}