#include <iostream>
using namespace std;
int change(int x){
if (x > 1) {
if(x % 2 == 0){
return change(x / 2) + 1;
}else{
return change((3 * x + 1 ) / 2) + 1;
}
}
return 0;
}
int main() {
int a;
while (cin >> a) { // 注意 while 处理多个 case
cout << change(a) << endl;
}
return 0;
}
// 64 位输出请用 printf("%lld")

京公网安备 11010502036488号