class Array
  def sum
    res = 0
    self.each {|x| res += x}
    res
  end
end

n, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_f).sort
while m > 0
  a[a.index(a.max)] = (a[a.index(a.max)] / 2).floor
  m -= 1
end
puts a.sum.to_i
