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