using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoderPre
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            var v = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);

            Array.Sort(v);

            for (int i = 1; i < N; i++)
            {
                v[i] = (v[i] + v[i - 1]) / 2;
            }

            Console.WriteLine(v[N-1]);
        }

    }
}