#include <iostream>
using namespace std;
int main()
{
	int n, t, c;
	while (cin >> n && n)
	{
		c = 0;
		t = n;
		while (t != 1)
		{
			if (!(t%2))	t /= 2;
			else		t = t * 3 + 1;
			c++;
		}
		cout << c << endl;
	}
}