#include <iostream>
#include <algorithm>
using namespace std;

int main(void){
	int in, ct=0;
	cin >> in;
	while (true){
		if (in % 2 == 0){
			in = in / 2;
			ct++;
		}
		else {
			in = in * 3 + 1;
			ct++;
		}
		if (in == 1){
			break;
		}
	}
	cout << ct << endl;
}