#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main() {
  int s; cin >> s;
  vector<int> flag(1000000, 0);
  flag[s] = 1;
  bool f = false;
  int cnt = 1;
  while(!f) {
    cnt++;
    if (s%2 == 0) {
      if (flag[s/2] == 1) {
        f = true;
      } else {
        flag[s/2] = 1;
        s = s/2;
      }
    } else {
      if (flag[s*3+1] == 1) {
        f = true;
      } else {
        flag[s*3+1] = 1;
        s = s*3+1;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}