static void Main()
        {
            var records = new List <long>();

            while (true)
            {
                try
                {
                    using (var sc = new SetConsole())
                    {
                        var sw = new Stopwatch();
                        sw.Start();
                        Program.Main(null);
                        sw.Stop();
                        records.Add(sw.ElapsedMilliseconds);
                        sw.Reset();
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                    Console.WriteLine("\n====================");
                    Console.WriteLine("Process was supended");
                    Console.WriteLine("====================\n");
                }
                if (records.Any())
                {
                    Console.WriteLine("\n====================");
                    Console.WriteLine($"Time is {records.Last()}ms");
                    Console.WriteLine($"AveTime is {records.Average()}ms");
                    Console.WriteLine("====================\n");
                }
            }
        }
 public static void Main(string[] args)
 {
     using (var sc = new SetConsole())
     {
         var abc = GetArray <int>();
         var max = abc.Max();
         var sum = abc.Sum();
         if (max % 2 == sum % 2)
         {
             CWrite((3 * max - sum) / 2);
         }
         else
         {
             CWrite((3 * ++max - sum) / 2);
         }
     }
 }