#include <iostream>
using namespace std;

typedef long long ll;
int n;

int main()
{
    while(cin >> n && n) {
        ll ans = 0;
        do {
            ans++;
            n = (n % 2) ? n * 3 + 1 : n / 2;
        } while(n != 1);
        cout << ans << endl;
    }
}