function Main(input) {
  input = input.split('\n');
  var i0 = input[0].split(' ');
  var N = i0[0];
  var M = i0[1];
  var An = input[1].split(' ');

  for (var i = M; i > 0; i--) {
    An = An.map(n => parseInt(n, 10))
           .sort((a, b) => a - b).reverse();
    An[0] = Math.floor(An[0] / Math.pow(2, 1));
  }
  // console.log(An);
  var sum = 0;
  An.forEach(n => sum += parseInt(n));
  console.log(sum);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
