parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Focm":[function(require,module,exports) {
var n={};!function(n){"use strict";n["Control.Apply"]=n["Control.Apply"]||{};var t=n["Control.Apply"];t.Apply=function(n,t){this.Functor0=n,this.apply=t},t.apply=function(n){return n.apply}}(n),function(n){"use strict";n["Control.Applicative"]=n["Control.Applicative"]||{};var t=n["Control.Applicative"],r=n["Control.Apply"],o=function(n){return n.pure};t.Applicative=function(n,t){this.Apply0=n,this.pure=t},t.pure=o,t.liftA1=function(n){return function(t){return function(e){return r.apply(n.Apply0())(o(n)(t))(e)}}}}(n),function(n){"use strict";n.map_=function(n){return function(t){return function(){return n(t())}}},n.pure_=function(n){return function(){return n}},n.bind_=function(n){return function(t){return function(){return t(n())()}}},n.for=function(n){return function(t){return function(r){return function(){for(var o=n;o<t;o++)r(o)()}}}},n["modify'"]=function(n){return function(t){return function(){var r=n(t.value);return t.value=r.state,r.value}}}}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(n){"use strict";n["Control.Bind"]=n["Control.Bind"]||{};var t=n["Control.Bind"];t.Bind=function(n,t){this.Apply0=n,this.bind=t},t.bind=function(n){return n.bind}}(n),function(n){"use strict";n["Control.Monad"]=n["Control.Monad"]||{};var t=n["Control.Monad"],r=n["Control.Applicative"],o=n["Control.Bind"];t.Monad=function(n,t){this.Applicative0=n,this.Bind1=t},t.ap=function(n){return function(t){return function(e){return o.bind(n.Bind1())(t)(function(t){return o.bind(n.Bind1())(e)(function(o){return r.pure(n.Applicative0())(t(o))})})}}}}(n),function(n){"use strict";n["Data.Function"]=n["Data.Function"]||{};n["Data.Function"].const=function(n){return function(t){return n}}}(n),function(t){"use strict";(n["Data.Unit"]=n["Data.Unit"]||{}).unit={}}(),function(n){"use strict";n["Data.Unit"]=n["Data.Unit"]||{};var t=n["Data.Unit"],r=n["Data.Unit"];t.unit=r.unit}(n),function(n){"use strict";n["Data.Functor"]=n["Data.Functor"]||{};var t=n["Data.Functor"],r=n["Data.Function"],o=n["Data.Unit"],e=function(n){return n.map};t.Functor=function(n){this.map=n},t.map=e,t.void=function(n){return e(n)(r.const(o.unit))}}(n),function(n){"use strict";n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{};var t=n["Control.Monad.ST.Internal"],r=n["Control.Monad.ST.Internal"],o=n["Control.Applicative"],e=n["Control.Apply"],i=n["Control.Bind"],u=n["Control.Monad"],a=new n["Data.Functor"].Functor(r.map_),c=new u.Monad(function(){return l},function(){return f}),f=new i.Bind(function(){return s},r.bind_),s=new e.Apply(function(){return a},u.ap(c)),l=new o.Applicative(function(){return s},r.pure_);t.modify=function(n){return r["modify'"](function(t){var r=n(t);return{state:r,value:r}})},t.functorST=a,t.applyST=s,t.applicativeST=l,t.bindST=f,t.monadST=c,t.for=r.for}(n),function(t){"use strict";(n["Data.Int"]=n["Data.Int"]||{}).fromStringAsImpl=function(n){return function(t){return function(r){var o;o=r<11?"[0-"+(r-1).toString()+"]":11===r?"[0-9a]":"[0-9a-"+String.fromCharCode(86+r)+"]";var e=new RegExp("^[\\+\\-]?"+o+"+$","i");return function(o){if(e.test(o)){var i=parseInt(o,r);return(0|i)===i?n(i):t}return t}}}}}(),function(n){"use strict";n["Data.Maybe"]=n["Data.Maybe"]||{};var t=n["Data.Maybe"],r=function(){function n(){}return n.value=new n,n}(),o=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Nothing=r,t.Just=o,t.fromJust=function(n){return function(n){if(n instanceof o)return n.value0;throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): "+[n.constructor.name])}}}(n),function(n){"use strict";n["Data.Int"]=n["Data.Int"]||{};var t=n["Data.Int"],r=n["Data.Int"],o=n["Data.Maybe"],e=r.fromStringAsImpl(o.Just.create)(o.Nothing.value),i=e(10);t.fromString=i,t.fromStringAs=e}(n),function(n){"use strict";n.intAdd=function(n){return function(t){return n+t|0}},n.intMul=function(n){return function(t){return n*t|0}}}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(n){"use strict";n["Data.Semiring"]=n["Data.Semiring"]||{};var t=n["Data.Semiring"],r=n["Data.Semiring"],o=function(n,t,r,o){this.add=n,this.mul=t,this.one=r,this.zero=o},e=new o(r.intAdd,r.intMul,1,0);t.Semiring=o,t.add=function(n){return n.add},t.zero=function(n){return n.zero},t.mul=function(n){return n.mul},t.one=function(n){return n.one},t.semiringInt=e}(n),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showIntImpl=function(n){return n.toString()}}(),function(n){"use strict";n["Data.Show"]=n["Data.Show"]||{};var t=n["Data.Show"],r=function(n){this.show=n},o=new r(n["Data.Show"].showIntImpl);t.Show=r,t.show=function(n){return n.show},t.showInt=o}(n),function(n){"use strict";n.split=function(n){return function(t){return t.split(n)}},n.trim=function(n){return n.trim()}}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(n){"use strict";n["Data.String.Common"]=n["Data.String.Common"]||{};var t=n["Data.String.Common"],r=n["Data.String.Common"];t.split=r.split,t.trim=r.trim}(n),function(n){"use strict";n.pureE=function(n){return function(){return n}},n.bindE=function(n){return function(t){return function(){return t(n())()}}}}(n.Effect=n.Effect||{}),function(n){"use strict";n.Effect=n.Effect||{};var t=n.Effect,r=n.Effect,o=n["Control.Applicative"],e=n["Control.Apply"],i=n["Control.Bind"],u=n["Control.Monad"],a=n["Data.Functor"],c=new u.Monad(function(){return l},function(){return f}),f=new i.Bind(function(){return s},r.bindE),s=new e.Apply(function(){return d},u.ap(c)),l=new o.Applicative(function(){return s},r.pureE),d=new a.Functor(o.liftA1(l));t.functorEffect=d,t.applyEffect=s,t.applicativeEffect=l,t.bindEffect=f,t.monadEffect=c}(n),function(n){"use strict";n["Node.Encoding"]=n["Node.Encoding"]||{};var t=n["Node.Encoding"],r=n["Data.Show"],o=function(){function n(){}return n.value=new n,n}(),e=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),s=function(){function n(){}return n.value=new n,n}(),l=new r.Show(function(n){if(n instanceof o)return"ASCII";if(n instanceof e)return"UTF8";if(n instanceof i)return"UTF16LE";if(n instanceof u)return"UCS2";if(n instanceof a)return"Base64";if(n instanceof c)return"Latin1";if(n instanceof f)return"Binary";if(n instanceof s)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});t.ASCII=o,t.UTF8=e,t.UTF16LE=i,t.UCS2=u,t.Base64=a,t.Latin1=c,t.Binary=f,t.Hex=s,t.showEncoding=l}(n),function(t){"use strict";(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}).unsafeRequireFS=require("fs")}(),function(t){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(n){"use strict";n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{};var t=n["Unsafe.Coerce"],r=n["Unsafe.Coerce"];t.unsafeCoerce=r.unsafeCoerce}(n),function(n){"use strict";n["Node.FS.Internal"]=n["Node.FS.Internal"]||{};var t=n["Node.FS.Internal"],r=n["Node.FS.Internal"],o=n["Unsafe.Coerce"].unsafeCoerce;t.mkEffect=o,t.unsafeRequireFS=r.unsafeRequireFS}(n),function(n){"use strict";n["Node.FS.Sync"]=n["Node.FS.Sync"]||{};var t=n["Node.FS.Sync"],r=n["Data.Show"],o=n["Node.Encoding"],e=n["Node.FS.Internal"],i=e.unsafeRequireFS;t.readTextFile=function(n){return function(t){return e.mkEffect(function(e){return i.readFileSync(t,{encoding:r.show(o.showEncoding)(n)})})}}}(n),function(t){"use strict";(n["Node.Process"]=n["Node.Process"]||{}).process=process}(),function(n){"use strict";n["Node.Process"]=n["Node.Process"]||{};var t=n["Node.Process"],r=n["Node.Process"].process.stdout;t.stdout=r}(n),function(n){"use strict";n.write=function(n){return function(t){return function(r){return function(){return n.write(t,null,r)}}}},n.writeStringImpl=function(n){return function(t){return function(r){return function(o){return function(){return n.write(r,t,o)}}}}}}(n["Node.Stream"]=n["Node.Stream"]||{}),function(n){"use strict";n["Node.Stream"]=n["Node.Stream"]||{};var t=n["Node.Stream"],r=n["Node.Stream"],o=n["Data.Show"],e=n["Node.Encoding"];t.writeString=function(n){return function(t){return r.writeStringImpl(n)(o.show(e.showEncoding)(t))}}}(n),function(n){"use strict";n.ABC087B=n.ABC087B||{};var t=n.ABC087B,r=n["Control.Applicative"],o=n["Control.Monad.ST.Internal"],e=n["Data.Functor"],i=n["Data.Int"],u=n["Data.Maybe"],a=n["Data.Semiring"],c=n["Data.Show"],f=n["Data.String.Common"],s=n["Data.Unit"],l=n.Effect,d=n["Node.Encoding"],p=n["Node.FS.Sync"],S=n["Node.Process"],m=n["Node.Stream"],v=(f.split(" "),function(n){return(t=n,l=f.split("\n")(f.trim(t)),d=u.fromJust()(i.fromString(l[3])),p=u.fromJust()(i.fromString(l[2])),S=u.fromJust()(i.fromString(l[1])),m=u.fromJust()(i.fromString(l[0])),function(){var n={value:0};return o.for(0)(m+1|0)(function(t){return o.for(0)(S+1|0)(function(i){return o.for(0)(p+1|0)(function(u){return(((500*t|0)+(100*i|0)|0)+(50*u|0)|0)===d?e.void(o.functorST)(o.modify(a.add(a.semiringInt)(1))(n)):r.pure(o.applicativeST)(s.unit)})})})(),c.show(c.showInt)(n.value)+"\n"})();var t,l,d,p,S,m});t.main=function(){var n=p.readTextFile(d.UTF8.value)("/dev/stdin")();m.writeString(S.stdout)(d.UTF8.value)(v(n))(r.pure(l.applicativeEffect)(s.unit))();return s.unit},t.solve=v}(n),n.ABC087B.main();
},{}]},{},["Focm"], null)

Measured memory_bytes: 10328