using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

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;
            public int Count { get; private set; } = 0;

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

            public void Enqueue(T item)
            {
                _heap[Count] = item;
                this.Count += 1;
                UpHeap();
            }

            public T Dequeue()
            {
                Swap(0, Count - 1);
                this.Count -= 1;
                DownHeap();

                return _heap[Count];
            }


            private void UpHeap()
            {
                var n = this.Count - 1;
                while (n != 0)
                {
                    // 親要素の座標
                    var parent = (n - 1) / 2;

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

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

                    if (child < this.Count - 1 && this.Compare(this._heap[child], this._heap[child + 1]) < 0)
                    {
                        // 左より右の子のほうが大きい値の場合、右を入れ替え対象にする
                        child += 1;
                    }

                    if (this.Compare(this._heap[parent], this._heap[child]) < 0)
                    {
                        this.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: 29788