using System;
class ProgramC
    {
        static void Main(string[] args)
        {
            
            string input = Console.ReadLine();
            int n = int.Parse(input);

            
            string[] input_b = Console.ReadLine().Split(' ');
            long[] b = new long[n];
            for(int i = 0;i < n;i++)
                b[i] = long.Parse(input_b[i]);

            Array.Sort(b);

            for(int i = 1;i < n;i++)
            {
                long temp = (b[i -1] + b[i]) / 2;
                b[i] = temp;
            }

            long ans = b[n - 1];

            Console.WriteLine(ans);
        }
    }