s = int(eval(input()))

a = [0] * 1000000

a[0] = s



for i in range(1,1000000):

  if a[i-1] % 2 == 0:

    a[i] = a[i-1]//2

  else:

    a[i] = a[i-1]*3+1

  if a[i] in a[:i]:

    print((i+1))

    exit()
S=int(eval(input()))

a=[]



for i in range(1, 1000001):

    if S in a:

        print(i)

        break

    else:

        a.append(S)

        if S%2==0:

            S=S/2

        else:

            S=3*S+1

s = int(eval(input()))
a = [0] * 1000000
a[0] = s
for i in range(1, 1000000):
    if a[i - 1] % 2 == 0:
        a[i] = a[i - 1] // 2
    else:
        a[i] = a[i - 1] * 3 + 1
    if a[i] in a[:i]:
        print((i + 1))
        exit()

S = int(eval(input()))
a = []
for i in range(1, 1000001):
    if S in a:
        print(i)
        break
    else:
        a.append(S)
        if S % 2 == 0:
            S = S / 2
        else:
            S = 3 * S + 1

-s = int(eval(input())) -a = [0] * 1000000 -a[0] = s -for i in range(1, 1000000): -    if a[i - 1] % 2 == 0: -        a[i] = a[i - 1] // 2 +S = int(eval(input())) +a = [] +for i in range(1, 1000001): +    if S in a: +        print(i) +        break -        a[i] = a[i - 1] * 3 + 1 -    if a[i] in a[:i]: -        print((i + 1)) -        exit() +        a.append(S) +        if S % 2 == 0: +            S = S / 2 +        else: +            S = 3 * S + 1