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);
  }
  for(var j=0;j<num[0];j++){
    ans+=a[j];
  }
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));