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

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