//https://pintia.cn/problem-sets/994805260223102976/problems
PTA乙级1001
#include <iostream>
using namespace std;
int main() {
int n, count = 0;
cin >> n;
while (n != 1) {
if (n % 2 != 0)
{n = 3 * n + 1;n=n/2;count++;}
else
{n = n / 2;count++;}
}
cout << count;
return 0;
}