n = int(input())
c = 0
while True:
    if n % 2 == 0:
        n = n // 2
    else:
        n = n * 3 + 1
    c += 1
    if n == 1:
        break
print(c)
/**************************************************************
	Problem: 1241
	User: admin
	Language: Python
	Result: Accepted
	Time:92 ms
	Memory:34244 kb
****************************************************************/