#include<iostream>
using namespace std;

int main() {
	int n;
	int ca = 0;
	while (cin >> n&&n!=0) {
		while (1) {
			if (n == 1) { break; }
			if (n % 2 == 1&&n!=1) {
				n=n * 3 + 1;
			}
			else if (n % 2 == 0) {
				n /= 2;
			}
			ca++;
			if (n == 1) { break; }
		}
		cout << ca << endl;
		ca = 0;
	}
	return 0;
}