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


for i in 1..m do
  max_num = 0
  for j in 0..a.length-1 do
    if a[j] > max_num then
      max_num = a[j]
      max_index = j
    end
  end
  a[max_index] = max_num/2
end
#
ans = 0
for number in a do
  ans += number.to_i
end

puts ans
