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

a = a.sort.reverse

for i in 1..m do
  a[0] = a[0].to_f/2
  a = a.sort.reverse

end

ans = 0
for number in a do
  ans += number.to_i
end

puts ans
