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

namespace AtCoder.D
{
    public class Program
    {
        public static void Main() { var r = GetResult(); Debug.WriteLine(r); Console.Write(r); }

        private static object GetResult()
        {
            var inputs = ReadLongs();
            var N = inputs[0];
            var M = inputs[1];
            var A = ReadLongs();

            var queue = new PriorityQueue<double>(Comparison);
            foreach (var a in A)
            {
                queue.Enqueue(a);
            }

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

            var sum = 0L;
            while (queue.Count > 0)
            {
                sum += (long)Math.Floor(queue.Dequeue());
            }

            return sum;
        }
        private static int Comparison(double x, double y)
        {
            if (x == y) return 0;
            return x == y ? 0
                : x < y ? 1 : -1;
        }

        #region Console

        public static string ReadText() { return Console.ReadLine(); }
        public static List<string> ReadTexts() { return Console.ReadLine().Split(' ').ToList(); }
        public static long ReadLong() { return long.Parse(Console.ReadLine()); }
        public static List<long> ReadLongs() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToList(); }

        #endregion
    }
    /// <summary>
    /// 優先度付キュー
    /// </summary>
    public class PriorityQueue<T>
    {
        private readonly List<T> _list;
        private readonly Comparison<T> _compare;
        public int Count { get; private set; }
        public PriorityQueue(Comparison<T> compare)
        {
            _list = new List<T>();
            _compare = compare;
            Count = 0;
        }

        public void Enqueue(T value)
        {
            var c = Add(value);
            while (c > 0)
            {
                var p = (c - 1) / 2;
                if (_compare(_list[c], _list[p]) < 0)
                {
                    Swap(p, c);
                }
                else
                {
                    break;
                }
                c = p;
            }
        }
        public T Dequeue()
        {
            var value = _list[0];
            _list[0] = _list[--Count];
            var p = 0;
            while (true)
            {
                var c1 = p * 2 + 1;
                var c2 = p * 2 + 2;
                if (c1 >= Count) { break; }
                var c = (c2 >= Count || _compare(_list[c1], _list[c2]) < 0) ? c1 : c2;
                if (_compare(_list[c], _list[p]) < 0)
                {
                    Swap(p, c);
                }
                else
                {
                    break;
                }
                p = c;
            }
            return value;
        }

        private int Add(T value)
        {
            if (Count == _list.Count)
            {
                _list.Add(value);
            }
            else
            {
                _list[Count] = value;
            }

            return Count++;
        }
        private void Swap(int a, int b)
        {
            var tmp = _list[a];
            _list[a] = _list[b];
            _list[b] = tmp;
        }
    }
}


Measured memory_bytes: 29276