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(_)));
        }

        public class PriorityQueue<T> : IEnumerable<T>
            where T : IComparable
        {
            private T[] _heap;

            private bool _isDescending;
            private bool _isSorted;

            private int _sz = 0;
            private int _count = 0;

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

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

            public void Enqueue(T x)
            {
                _isSorted = false;
                _count++;

                var nodeNumber = _sz++;
                while (nodeNumber > 0)
                {
                    var parentNodeNumber = (nodeNumber - 1) / 2;

                    if (Compare(_heap[parentNodeNumber], x) <= 0) break;

                    _heap[nodeNumber] = _heap[parentNodeNumber];
                    nodeNumber = parentNodeNumber;
                }

                _heap[nodeNumber] = x;
            }

            public T Dequeue()
            {
                _isSorted = false;
                _count--;

                var ret = _heap[0];
                var x = _heap[--_sz];

                int i = 0;
                while (i * 2 + 1 < _sz)
                {
                    int child1 = i * 2 + 1;
                    int child2 = i * 2 + 2;

                    if (child2 < _sz && Compare(_heap[child2], _heap[child1]) < 0) child1 = child2;

                    if (Compare(_heap[child1], x) >= 0) break;

                    _heap[i] = _heap[child1];
                    i = child1;
                }

                _heap[i] = x;

                return ret;
            }

            public int Count()
            {
                return _count;
            }

            public T Peek()
            {
                return _heap[0];
            }

            public bool Contains(T x)
            {
                for (int i = 0; i < _sz; i++) if (x.Equals(_heap[i])) return true;
                return false;
            }

            public void Clear()
            {
                _isSorted = true;
                Array.Clear(_heap, 0, _heap.Length);
            }

            public IEnumerator<T> GetEnumerator()
            {
                if (!_isSorted)
                {
                    Array.Sort<T>(_heap, (x, y) => Compare(x, y));
                    _isSorted = true;
                }

                foreach (var r in _heap)
                {
                    yield return r;
                }
            }

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


Measured memory_bytes: 32704