n, coupons = gets.chomp.split.map(&:to_i)
items = gets.chomp.split.map(&:to_i).sort
sum = 0
coupons.times do
  hight_price = items.max
  items[items.index(hight_price)] = hight_price / 2
end

items.each do |item|
  sum += item
end
puts sum