using System;
class test1001
{
static void Main45()
{
int count = 0;
int n = Convert.ToInt32(Console.ReadLine());
while (n != 1)
{
if (n % 2 == 0)
{
n = n / 2;
}
else
{
n = (3 * n + 1) / 2;
}
count = count + 1;
}
Console.Write(count);
}
}