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(' ');

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