using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
Stack<int> stack =new Stack<int>();
stack.Push(int.Parse(Console.ReadLine()));
while(stack.Peek()!=1)
if(stack.Peek()%2==0)
{stack.Push(stack.Peek()/2);}
else
stack.Push(stack.Peek()*3+1);
}
Console.WriteLine(stack.Count);