using System; using System.Linq; class Program { static void Main() { var n = long.Parse(Console.ReadLine()); var i = 0; var nmax = n; while (n != 1) { if ((n & 1) == 0) { n = n / 2; } else { n = 3 * n + 1; } i++; nmax = Math.Max(nmax, n); } Console.WriteLine(i); Console.WriteLine(nmax); } }