s=int(eval(input()))

def f(i):

    if i%2==0:

        return i//2

    else:

        return 3*i+1

a=[]

a.append(s)

for i in range(1,pow(10,7)):

    b=f(a[i-1])

    if b in a:

        print((i+1))

        break

    a.append(b)
s=int(eval(input()))

if s<3:

    print((4))

    exit()

for i in range(10**7+1):

    if s==4:

        print((i+4))

        exit()

    if s%2:

        s=3*s+1

    else:

        s//=2
s = int(eval(input()))


def f(i):
    if i % 2 == 0:
        return i // 2
    else:
        return 3 * i + 1


a = []
a.append(s)
for i in range(1, pow(10, 7)):
    b = f(a[i - 1])
    if b in a:
        print((i + 1))
        break
    a.append(b)

s = int(eval(input()))
if s < 3:
    print((4))
    exit()
for i in range(10**7 + 1):
    if s == 4:
        print((i + 4))
        exit()
    if s % 2:
        s = 3 * s + 1
    else:
        s //= 2

- - -def f(i): -    if i % 2 == 0: -        return i // 2 +if s < 3: +    print((4)) +    exit() +for i in range(10**7 + 1): +    if s == 4: +        print((i + 4)) +        exit() +    if s % 2: +        s = 3 * s + 1 -        return 3 * i + 1 - - -a = [] -a.append(s) -for i in range(1, pow(10, 7)): -    b = f(a[i - 1]) -    if b in a: -        print((i + 1)) -        break -    a.append(b) +        s //= 2