# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <unordered_map>

using namespace std;
using LL = long long;

constexpr int MOD = 1000000000 + 7;
constexpr int INF = 2000000000;

int main() {
	LL n;
	while (cin >> n&&n) {
		int count = 0;
		while (n != 1) {
			count++;
			if (n % 2 == 0)n /= 2;
			else n = n * 3 + 1;
		}
		cout << count << endl;
	}
}