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