#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main(void)
{
	for (int u = 0; u, 50; u++)
	{
		long long n;

		cin >> n;
		if (n == 0)
		{
			return 0;
		}

		for (long long i = 0; i < 100000; i++)
		{
			if (n == 1)
			{
				cout << i << endl;
				break;
			}
			else if (n % 2 == 0)
			{
				n = n / 2;
			}
			else
			{
				n = (n * 3) + 1;
			}
		}
	}
}


