using System;
using System.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace debug
{
    class main 
    {
        static void Main(string[] args)
        {
            ProgramD a = new ProgramD();
            a.main();
            
        }

    }

    class ProgramA
    {
        public void main()
        {
            //入力
            string s = Console.ReadLine();

            if (s == "Sunny")
                Console.WriteLine("Cloudy");
            else if (s == "Cloudy")
                Console.WriteLine("Rainy");
            else
                Console.WriteLine("Sunny");

        }


    }

    class ProgramB
    {
        public void main()
        {
            //入力
            string s = Console.ReadLine();

            for(int i = 0;i < s.Length;i++)
            {
                if( i % 2 == 0)
                {
                    if(s[i] == 'L')
                    {
                        Console.WriteLine("No");
                        return;
                    }
                    continue;
                }

                if (s[i] == 'R')
                {
                    Console.WriteLine("No");
                    return;
                }
            }

            Console.WriteLine("Yes");
        }


    }

    class ProgramC
    {
        public void main()
        {
            //入力
            string[] s = Console.ReadLine().Split(' ');
            long n = long.Parse(s[0]);
            long k = long.Parse(s[1]);
            long q = long.Parse(s[2]);

            int[] num = new int[n];

            for (int i = 0; i < q; i++)
            {
                int temp = int.Parse(Console.ReadLine());
                num[temp - 1]++;
            }

            for (int i = 0; i < n; i++)
            {
                if(k - (q - num[i]) > 0)
                    Console.WriteLine("Yes");
                else
                    Console.WriteLine("No");
            }
        }


    }

    class ProgramD
    {
        public void main()
        {
            string[] s = Console.ReadLine().Split(' ');
            int n = int.Parse(s[0]);
            int m = int.Parse(s[1]);

            string[] a = Console.ReadLine().Split(' ');

            PriorityQueue<long> p = new PriorityQueue<long>(n);


            for (int i = 0; i < n; i++)
                p.Enqueue(long.Parse(a[i]));

            for (int i = 0; i < m; i++)
            {
                long t = p.Dequeue();
                t /= 2;
                p.Enqueue(t);
            }

            long ans = 0;

            for (int i = 0; i < n; i++)
                ans += p.Dequeue();

            Console.WriteLine(ans);


        }

    }

    /*優先度付きキュー*/
    class PriorityQueue<T> where T : IComparable<T>
    {
        public readonly T[] Array;
        public readonly bool Greater;
        public int Count { get; private set; } = 0;

        public PriorityQueue(int capacity, bool greater = true)
        {
            this.Array = new T[capacity];
            this.Greater = greater;
        }

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

        public T Dequeue()
        {
            // 先頭要素を末尾にして再構成
            this.Swap(0, this.Count - 1);
            this.Count -= 1;
            this.DownHeap();

            return this.Array[this.Count];
        }


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

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

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

        //aとbを比較する
        private int Compare(T a, T b)
        {
            var c = a.CompareTo(b);
            if (!this.Greater)
            {
                c = -c;
            }
            return c;
        }

        //aとbを入れ替える
        private void Swap(int a, int b)
        {
            var tmp = this.Array[a];
            this.Array[a] = this.Array[b];
            this.Array[b] = tmp;
        }
    }


}


Measured memory_bytes: 25436