s = int(eval(input()))



def func(n):

    if n%2 == 0:

        return int(n / 2)

    else:

        return 3 * n + 1



a = [s]

i = 0

flg = 1



while(flg):

    a.append(func(a[i]))

    #print(a)

    for k in range(len(a)):

        for l in range(1, len(a)-k): 

            if a[k] == a[k+l]:

                print((k+l+1))

                break

        else:

            continue

        break

    else:

        i += 1

        continue

    break
s = int(eval(input()))



def func(n):

    if n%2 == 0:

        return int(n / 2)

    else:

        return 3 * n + 1



def check(a, k):    

    for l in range(1, len(a)-k): 

        if a[k] == a[k+l]:

            print((k+l+1))

            return False

    return True



a = [s]

i = 0

flg = 1



while(flg):

    a.append(func(a[i]))

    #print(a)

    for k in range(len(a)):

        if not check(a, k):

            flg = 0

            break

    i += 1
s = int(eval(input()))


def func(n):
    if n % 2 == 0:
        return int(n / 2)
    else:
        return 3 * n + 1


a = [s]
i = 0
flg = 1
while flg:
    a.append(func(a[i]))
    # print(a)
    for k in range(len(a)):
        for l in range(1, len(a) - k):
            if a[k] == a[k + l]:
                print((k + l + 1))
                break
        else:
            continue
        break
    else:
        i += 1
        continue
    break

s = int(eval(input()))


def func(n):
    if n % 2 == 0:
        return int(n / 2)
    else:
        return 3 * n + 1


def check(a, k):
    for l in range(1, len(a) - k):
        if a[k] == a[k + l]:
            print((k + l + 1))
            return False
    return True


a = [s]
i = 0
flg = 1
while flg:
    a.append(func(a[i]))
    # print(a)
    for k in range(len(a)):
        if not check(a, k):
            flg = 0
            break
    i += 1

+def check(a, k): +    for l in range(1, len(a) - k): +        if a[k] == a[k + l]: +            print((k + l + 1)) +            return False +    return True + + -        for l in range(1, len(a) - k): -            if a[k] == a[k + l]: -                print((k + l + 1)) -                break -        else: -            continue -        break -    else: -        i += 1 -        continue -    break +        if not check(a, k): +            flg = 0 +            break +    i += 1