#include <iostream>
using namespace std;
 
int main() { 
    int n, f = 0, ans = 1;
    cin >> n;
    while(f < 2) {
        if(n%2 == 0) {
            n /= 2;
        } else {
            n = 3*n + 1;
        }
        if(n == 4) f++;
        ans++;
    }
    cout << ans << '\n';
}

