module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){r(1)(r(3).readFileSync("/dev/stdin","UTF-8").split("\n"))},function(t,e,r){function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,h=t[Symbol.iterator]();!(n=(a=h.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==h.return||h.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=r(2);t.exports=function(t){var e=n(t[0].split(" ").map(function(t){return Number(t)}),2),r=e[0],o=e[1],a=new i;t[1].split(" ").map(function(t){a.pushItem(Number(t))});for(var h=0;h<o;h++){var s=Math.floor(a.getTop()/2);a.removeTop(),a.pushItem(s)}for(var u=0,p=0;p<r;p++)u+=a.heap[p];console.log(u)}},function(t,e,r){"use strict";function n(t,e){return t<=e}function i(t,e){return t>=e}t.exports=class{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;this.heap=t,this.cf=e?n:i,r&&(this.cf=r),this.size=this.heap.length}pushItem(t){this.size+=1,this.heap.push(t);for(var e=this.heap.length-1;0!=e;){var r=Math.floor((e-1)/2);if(this.cf(this.heap[e],this.heap[r]))break;var n=this.heap[r];this.heap[r]=this.heap[e],this.heap[e]=n,e=r}}getTop(){return this.heap[0]}removeTop(){if(0!=this.size){this.size-=1;var t=this.heap.length-1;this.heap[0]=this.heap[t],this.heap.pop(),t--;for(var e=0;2*e+1<=t;){var r=this.heap[2*e+1],n=2*e+2<=t?this.heap[2*e+2]:r;if(this.cf(n,r)){if(this.cf(r,this.heap[e]))break;var i=r;this.heap[2*e+1]=this.heap[e],this.heap[e]=i,e=2*e+1}else{if(this.cf(n,this.heap[e]))break;var o=n;this.heap[2*e+2]=this.heap[e],this.heap[e]=o,e=2*e+2}}}}}},function(t,e){t.exports=require("fs")}]);