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

namespace SplitLength
{
    class Program
    {
        static void Main(string[] args)
        {
            var array = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var N = array[0];
            var M = array[1];

            var priceArray = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var queue = new PriorityQueue<decimal>(priceArray.Length);
            for (int i = 0; i < priceArray.Length; i++)
            {
                queue.Enqueue(priceArray[i]);
            }

            for (int i = 0; i < M; i++)
            {
                var max = queue.Dequeue();
                queue.Enqueue(max / 2);
            }

            Console.WriteLine(queue.Sum(_ => Math.Floor(_)));
        }
        class PriorityQueue<T> : IEnumerable<T>
            where T : IComparable<T>
        {
            private readonly T[] _heap;
            private readonly bool _isDescending;
            private bool _isSorted;
            public int Count { get; private set; } = 0;

            public PriorityQueue(int capacity, bool isDescending = true)
            {
                _heap = new T[capacity];
                _isDescending = isDescending;
                _isSorted = true;
            }

            public void Enqueue(T item)
            {
                _isSorted = false;
                _heap[Count] = item;
                Count++;
                UpHeap();
            }

            public T Dequeue()
            {
                _isSorted = false;
                Swap(0, Count - 1);
                Count--;
                DownHeap();

                return _heap[Count];
            }

            private void UpHeap()
            {
                var n = Count - 1;
                while (n != 0)
                {
                    var parent = (n - 1) / 2;

                    if (Compare(_heap[n], _heap[parent]) > 0)
                    {
                        Swap(n, parent);
                        n = parent;
                    }
                    else
                        break;
                }
            }

            private void DownHeap()
            {
                var parent = 0;
                while (true)
                {
                    var child = 2 * parent + 1;
                    if (child > Count - 1) break;

                    if (child < Count - 1 && Compare(_heap[child], _heap[child + 1]) < 0)
                        child++;

                    if (Compare(_heap[parent], _heap[child]) < 0)
                    {
                        Swap(parent, child);
                        parent = child;
                    }
                    else
                        break;
                }
            }

            private int Compare(T a, T b)
            {
                return _isDescending ? a.CompareTo(b) : b.CompareTo(a);
            }

            private void Swap(int a, int b)
            {
                var tmp = _heap[a];
                _heap[a] = _heap[b];
                _heap[b] = tmp;
            }

            public IEnumerator<T> GetEnumerator()
            {
                var count = Count;
                var array = new T[count];
                for (int i = 0; i < count; i++)
                {
                    array[i] = Dequeue();
                }

                for (int i = 0; i < count; i++)
                {
                    Enqueue(array[i]);
                }

                for (int i = 0; i < count; i++)
                {
                    yield return array[i];
                }
            }

            IEnumerator IEnumerable.GetEnumerator()
            {
                return GetEnumerator();
            }
        }
    }
}


Measured memory_bytes: 33884