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 => heapPush(An, parseInt(n, 10)));


  var Atmp, Amax, Ai;
  for (var i = 0; i < M; i++) {
    Amax = An[0];
    heapPop(An);
    heapPush(An, Math.floor(Amax / Math.pow(2, 1)));
  }
  // console.log(An);
  var sum = 0;
  An.forEach(n => sum += parseInt(n));
  console.log(sum);
}
function heapPush(list, elem) {
  var n = list.length;
  list.push(elem);

  var i, tmp;
  while(n != 0) {
    i = Math.floor((n - 1) / 2);
    if (list[n] > list[i]) {
      tmp = list[n];
      list[n] = list[i];
      list[i] = tmp;
    }
    n = i;
  }
  return list;
}
function heapPop(list) {
  var n = list.length - 1;
  var i = 0;
  list[i] = list[n];
  var pop = list.pop();

  var j, tmp;
  for (i, j; (j = i * 2 + 1) < n;) {
    if ((j != n - 1) && (list[j] < list[j + 1])) {
      j = j + 1;
    }
    if (list[j] > list[i]) {
      tmp = list[j];
      list[j] = list[i];
      list[i] = tmp;
    }
    i = j;
  }
  return pop;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));