#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int i = 1;
while (n != 1) {
if (n % 2 != 0) {
n = 3 * n + 1;
} else {
n = n / 2;
}
i += 1;
}
cout << i;
return 0;
}