#include<iostream>
using namespace std;
int main()
{
int count = 0;
int n = 0;
cin >> n;
while (true)
{
if (n == 1)
break;
else
{
count++;
if (n % 2 == 0)
n = n >> 1;
else
n = (3 * n + 1) >> 1;
}
}
cout << count;
system("pause");
}
using namespace std;
int main()
{
int count = 0;
int n = 0;
cin >> n;
while (true)
{
if (n == 1)
break;
else
{
count++;
if (n % 2 == 0)
n = n >> 1;
else
n = (3 * n + 1) >> 1;
}
}
cout << count;
system("pause");
}