#include<iostream>

using namespace std;

int main() {
	int s;
	cin >> s;

	int sum = 1;
	while (1) {
		if (s == 4 || s == 2 || s == 1)break;
		if (s % 2 == 0)s /= 2;
		else s = s * 3 + 1;
		sum++;
	}

	cout << sum + 3 << endl;

	return 0;
}