using System;
class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        int[] d = new int[n];
        string[] input = Console.ReadLine().Split(' ');
        for (int i = 0; i < n; i++)
        {
            d[i] = int.Parse(input[i]);
        }
        Array.Sort(d);

        for (int i = 0; i < n - 1; i++)
        {
            if (d[i] == 0) continue;
            for (int j = i + 1; j < n; j++)
            {
                if (d[j] == 0) continue;

                d[i] = (d[i] + d[j]) / 2;
                d[j] = 0;
                Array.Sort(d);
                break;
            }
        }

        int sum = 0;
        for (int i = 0; i < n; i++)
        {
            sum += d[i];
        }

        Console.WriteLine(sum);
    }

   
}