#include<iostream>

using namespace std;

int main(){
	 
	long long n;
	
	while( cin >> n ) {
		
	int count = 0;
	if( n == 0)
	break;
	
	while(true) {
		
		if( n == 1)
		break;
		
		else if ( n % 2)
		n = n * 3 + 1;
		
		else
		n /= 2;
		
		count++;
	}
	cout << count << "\n";
}
  	return 0;
}
