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(' ').map(n => parseInt(n, 10));

  var Atmp, Amax, Ai;
  for (var i = 0; i < M; i++) {
    Amax = Math.max.apply(null, An);
    Ai = An.indexOf(Amax);
    An[Ai] = Math.floor(An[Ai] / 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"));
