a = int(input())
r = 0
while a != 1:
    if a % 2 == 0:
        a /= 2
    else:
        a = a * 3 + 1
    r += 1
print(r)

7a24dcdd97a453944ca2df95c6a4dfcd19f451f8
<mask token>

<mask token>
while a != 1:
    if a % 2 == 0:
        a /= 2
    else:
        a = a * 3 + 1
    r += 1
print(r)

a = int(input())
r = 0
while a != 1:
    if a % 2 == 0:
        a /= 2
    else:
        a = a * 3 + 1
    r += 1
print(r)
