#include<bits/stdc++.h>
using namespace std;

int main() {
    int n;
    while (cin >> n) {//while处理多个case
        int count = 0;//count变量用于计数
        while (n != 1) {
            if (n % 2 == 0) {//n为偶数
                n /= 2;
                count++;
            } else {//n为奇数
                n = (3 * n + 1) / 2;
                count++;
            }
        }
        cout << count << endl;
    }
}