#!/usr/bin/env python3



S = int(eval(input()))



if S == 1 or S == 2 or S == 4:

    print((4))

    exit()



A = [S]

e = S

cnt = 0

while True:

    if e % 2 == 0:

        v = e//2

    else:

        v = 3*e+1

    A.append(v)

    e = v

    cnt += 1

    if v == 4:

        print((cnt+4))

        exit()



#!/usr/bin/env python3



S = int(eval(input()))



if S == 1 or S == 2 or S == 4:

    print((4))

    exit()



e = S

cnt = 0

while True:

    if e % 2 == 0:

        v = e//2

    else:

        v = 3*e+1

    e = v

    cnt += 1

    if v == 4:

        print((cnt+4))

        exit()



#!/usr/bin/env python3
S = int(eval(input()))
if S == 1 or S == 2 or S == 4:
    print((4))
    exit()
A = [S]
e = S
cnt = 0
while True:
    if e % 2 == 0:
        v = e // 2
    else:
        v = 3 * e + 1
    A.append(v)
    e = v
    cnt += 1
    if v == 4:
        print((cnt + 4))
        exit()

#!/usr/bin/env python3
S = int(eval(input()))
if S == 1 or S == 2 or S == 4:
    print((4))
    exit()
e = S
cnt = 0
while True:
    if e % 2 == 0:
        v = e // 2
    else:
        v = 3 * e + 1
    e = v
    cnt += 1
    if v == 4:
        print((cnt + 4))
        exit()

-A = [S] -    A.append(v)