"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const M = parseInt(arg[0].split(" ")[1]);
    
    const A = arg[1].split(" ").map(n=>parseInt(n)).sort((a,b)=>a-b);
    
    
    for(let i=0; i<M; i++) {
        const highest = A[A.length - 1];
        const halfed   = Math.floor(highest / 2);
        
        A.pop();
        
        for(let j=A.length; j>=0; j--) {
            if(A[j] < halfed) {
                A.splice(j+1, 0, halfed);
                break;
            }
            
            if(j === 0) {
                A.unshift(halfed);
            }
        }
    }

    console.log(A.reduce((m,n)=>m+n));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));