#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// Welcome to my source code!
static const int MAX = 1000010;
int main() {
    int s;
    cin >> s;
    int a[MAX] = {}; a[0] = s;
    bool flag = false;
    int ans;
    for (int i = 1; i < 1e7; i++) {
        if (s % 2 == 0) s /= 2;
        else s = 3 * s + 1;
        a[i] = s;
        for (int j = 0; j < i; j++) {
            if (a[j] == a[i]) {
                ans = i + 1;
                flag = true;
                break;
            }
        }
        if (flag) break;
    }
    cout << ans << endl;
}