#include <iostream>
using namespace std;
int main() {
int x;
while(cin>>x){
int count = 0;
while(x != 1){
if(x % 2 == 0){
x = x / 2;
count = count + 1;
}else{
x = (3*x + 1) / 2;
count = count + 1;
}
}
cout<<count<<endl;
}
}
// 64 位输出请用 printf("%lld")

京公网安备 11010502036488号