n, m = gets.chomp.split(" ").map(&:to_i)
a = gets.chomp.split(" ").map(&:to_i)
count = 0
arr = []
a.each do |i|
    arr << i
end
arr = arr.sort
m.times do |j|
    price = arr.pop / 2
    arr << price
    arr = arr.sort
end
ans = 0
arr.each do |k|
    ans += k
end
puts ans