#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int count = 0;//执行次数计数
while (n != 1) //不等于1的话就循环执行
{
if (n % 2 == 0) {//为偶数
n /= 2;
++count;
}
else {//为奇数
n = (3 * n + 1) / 2;
++count;
}
}
cout << count << endl;
return 0;
}