input_lines = gets.chop.split.map(&:to_i)
input_lines2 = gets.chop.split.map(&:to_i)
for time in 0...input_lines[1]
    input_lines2[(input_lines2.index(input_lines2.max))] = input_lines2[(input_lines2.index(input_lines2.max))] / 2  
end

sum = 0 
for item in input_lines2
    sum = item + sum
end
puts sum