#!/usr/bin/env python3 n = int(input()) i = 0 a = n while n != 1: if n % 2 == 0: n //= 2 else: n = n * 3 + 1 i += 1 a = max(a, n) print(i) print(a)