n0 = int(input()) list = [] list.append(n0) i1 = 0 # limit = 0 if n0 != 1: while True: cur = list[-1] if cur % 2 == 0: list.append(cur / 2) else: list.append(3 * cur + 1) if list[-1] == 1: i1 = len(list) - 1 break # limit += 1 # if limit > 500: # break print(i1) print(int(max(list)))