#include <bits/stdc++.h> using namespace std; int main() { int n , t; int i = 0; cin >> n;
if( n % 2 == 0 )
{
while( n != 1 )
{
if( n % 2 == 1 )
{
n = n * 3 + 1;
i ++;
}
if( n % 2 == 0 )
{
n = n / 2;
i ++;
}
if( n == 1 ) break;
}
}
else if( n % 2 == 1 )
{
while( n != 1 )
{
if( n % 2 == 1 )
{
n = n * 3 + 1;
i ++;
}
if( n % 2 == 0 )
{
n = n / 2;
i ++;
}
if( n == 1 ) break;
}
}
cout << i << endl;
return 0;
}