class PriorityQueue

  def initialize(&compare)
    @items = []
    if block_given?
      @compare_proc = compare
    else
      @compare_proc = Proc.new { |a, b| a > b }
    end
  end
  
  def push(x)
    n = @items.size
    @items << x
    while n != 0
      p = (n - 1) / 2
      if @compare_proc.call(@items[n], @items[p])
        @items[p], @items[n] = @items[n], @items[p]
      end
      n = p
    end
  end
  
  def pop
    result = @items[0]
    @items[0] = @items[-1]
    @items.delete_at(-1)

    n = 0
    loop do
      left = 2 * n + 1
      break if left >= @items.size

      right = left + 1
      if (right < @items.size) && @compare_proc.call(@items[right], @items[left])
        c = right
      else
        c = left
      end

      break unless @compare_proc.call(@items[c], @items[n])

      @items[n], @items[c] = @items[c], @items[n]
      n = c
    end
    result
  end

  def empty?
    @items.empty?
  end
  
  def size
    @items.size
  end
end

n, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i).sort.reverse



ans = 0
if n == 1
  ans = a[0] / 2 ** m
else
  queue = PriorityQueue.new
  a.each do |x|
    queue.push x
  end
  while m > 0
    x = queue.pop
    queue.push x / 2
    m -= 1
  end
  ans = 0
  while !queue.empty?
    ans += queue.pop
  end
end

puts ans

