#include<cstdio>
int main(){
	int n;
	while (scanf("%d", &n) != EOF){
		int k = 0;
		if (n == 1){
			printf("0");
		}
		else{
			while (n != 1){
				if (n % 2 == 0){
					n = n / 2;
					k++;
				}
				else{
					n = 3 * n + 1;
					k++;
					n = n / 2;
				}
			}
			printf("%d\n", k);
		}
	}
}