#include <iostream>

using namespace std;

int calc(int n, int k)
{
	if (n == 1) { return k; }

	else if (n % 2 == 0) { return calc(n / 2, k + 1); }

	else if (n % 2 == 1) { return calc(n * 3 + 1, k + 1); }
}

int main()
{
	const int DATASETS = 1000;

	int N[DATASETS], C = 0;

	while (true)
	{
		cin >> N[C];

		if (N[C] == 0) { goto Exit; }

		C++;
	}

Exit:;

	for (int i = 0; i < C; i++)
	{
		cout << calc(N[i], 0) << endl;
	}

	return 0;
}