function Main(input){
input = input.split("\n");
linefirst = input[0].split(" ");
A = input[1].split(" ");
var N = linefirst[0];
var M = linefirst[1];
var max;
var maxplace;
for( p=0;p !=M;p ++){
 max = Math.max.apply(null,A);
 maxplace = A.findIndex( item => item === max);
 A[maxplace]  = A[maxplace]/2;
}
A = A.map(item => Math.floor(item))
var sum = 0;
    for (var i=0,len=N-1; i<len; ++i) {
        sum += A[i];
    };
console.log(sum);