function Main(arg) {
 
    var N = arg.split("\n")[0].split(" ")[0]-0;
    var M = arg.split("\n")[0].split(" ")[1]-0;

    var A = arg.split("\n")[1].split(" ");

    for (var i = 0; i < A.length; i++){
        A[i] = A[i] - 0;
    }

    for (var i = 0; i < M; i++){
        var max = Math.max.apply(null, A);
        var index = A.indexOf(max);

        A[index] = Math.floor(A[index] / 2);
    }

    var ans = 0;
    for (var i = 0; i < N; i++) {
        ans += A[i];
    }

    console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));