#include <iostream>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int s; cin >> s;
    int ans = 4;
    while (s > 4 || s == 3) {
        s = (s & 1) ? 3 * s + 1 : s / 2;
        ans++;
    }
    cout << ans << "\n";
}