#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define repr(i,a,b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vd = vector<double>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;
const int N = 1000000;
int main() {
  int s;
  cin >> s;
  
  vi a(N+1,0);
  a.at(1) = s;
  repi(i,2,N) {
    if (a.at(i-1)%2==0) {
      a.at(i) = a.at(i-1)/2;
    }
    else {
      a.at(i) = 3*a.at(i-1)+1;
    }
    
    repi(j,1,i-1) {
      if (a.at(j)==a.at(i)) {
        cout << i << endl;
        return 0;
      }
    }
  }
}