include
using namespace std;
int main()
{
int n,temp = 0;
cin >> n;
while(n != 1)
{
if(n % 2 == 0)
{
n = n/2;
temp++;
} else{
n = 3*n + 1;
temp++;
}
}
cout<<temp;
return 0;
}