function Main(input) {
  input = input.split("\n");
  num = input[0].split(" ").map(Number);
  a = input[1].split(" ").map(Number);
  var ans = 0;
  var p = [];
  for(var i=0;i<num[1];i++){
    a[a.indexOf(Math.max.apply(null, a))] = Math.floor(a[a.indexOf(Math.max.apply(null, a))]/2);
  }
  var sum  = function(arr) {
    var sum = 0;
    arr.forEach(function(elm) {
        sum += elm;
    });
    return sum;
  };
  ans = sum(a);
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));