#include #include using namespace std; int main() { while(1) { int n,count = 0; cin >> n; if(cin.eof()) { break; } while(n != 1) { if(n % 2) { n *= 3; n++; count++; continue; } n /= 2; count++; } cout << count << endl; } return 0; }