/*! path:atcoder/abc154/d */!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}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 o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));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){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};e.__esModule=!0;var o=n(r(1)),u=r(2);o.default.readFile("/dev/stdin","utf8",(function(t,e){!function(t){var e=new u.Solver,r=e.parse(t),n=e.solve(r);e.print(n)}(e)}))},function(t,e){t.exports=require("fs")},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.solve=function(t){for(var e=t.dice,r=t.K,n=0,o=0,u=0;u<e.length;u++)if(n+=e[u],u>=r-1){var i=(r+n)/2;o=Math.max(i,o),n-=e[u-(r-1)]}return{answer:o}},e.prototype.parse=function(t){for(var e=t.split(/\s+/).map((function(t){return parseInt(t)})),r=e[0],n=e[1],o=[],u=0;u<r;u++)o.push(e[2+u]);return{K:n,dice:o}},e.prototype.print=function(t){console.log(t.answer)},e}(r(3).SolverBase);e.Solver=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){};e.SolverBase=n}]);
//# sourceMappingURL=main.js.map