using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var set = new HashSet{ n }; var count = 0; while (n != 1) { if (n % 2 == 0) n >>= 1; else n = 3 * n + 1; ++count; if (!set.Add(n)) break; } WriteLine(count); WriteLine(set.Max()); } }