#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<array>
#include<cstdlib>
#include<ctime>
#include<climits>
using namespace std;
int f(int n){
	if(n % 2 == 0){
		return n / 2;
	}
	else{
		return 3 * n + 1;
	}
}
int main(){
	int s;
	cin >> s;
	//int a[1000000];
	//vector<int> a;
	vector<int> a(1000000);
	a[0] = s;
	int ans = 0;
	for(int i = 1;; i++){
		a[i] = f(a[i - 1]);
		for(int j = i - 1; j >= 0; j--){
			if(a[i] == a[j]){
				ans = i + 1;
				goto Exit;//
			}
		}
	}
Exit://
	cout << ans << endl;
}