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

# 値下げ金額が2円以上を探す
m.times do |v|
  max = a.max
  index = (0...a.size).bsearch {|i| a[i] == max}
  a[index] = max / 2
end

print a.inject(:+)
