lines = []
while line = gets
    lines << line.chomp.split(' ').map(&:to_i)
end

N = lines[0][0]
M = lines[0][1]

price = lines[1].sort.reverse
new_price = price

num_coupon = M
while num_coupon > 0 do
  cut_off = price[0] / 2
  used_coupon = 0
  for i in 1..N do
    if num_coupon == 0 then
      price = price.sort.reverse
      for i in 1..used_coupon do
        price[i-1] /= 2
      end
      break
    elsif price[i-1] < cut_off then
      break
    end
    new_price[i-1] = price[i-1] / 2
    num_coupon -= 1
    used_coupon += 1
  end
  price = new_price
end
  
ans = 0
for i in 1..N do
  ans += price[i-1]
end
print ans