#include <iostream>
#include <vector>
#include <algorithm>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

typedef long long ll;

int main()
{
	ll a;
	while(cin >> a && a)
	{
		ll count = 0;

		while(true)
		{
			if(a == 1) break;

			if(a%2 == 0)
			{
				a /= 2;
			}
			else
			{
				a = a*3 + 1;
			}
			count++;
		}

		cout << count << endl;
	}
	return 0;
}