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(t){"use strict";(n["Data.Eq"]=n["Data.Eq"]||{}).refEq=function(n){return function(t){return n===t}}}(),function(t){"use strict";var e=n["Data.Eq"],a=(n["Data.HeytingAlgebra"],n["Data.Symbol"],n["Data.Unit"],n["Data.Void"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n){this.eq=n}),r=new a(e.refEq);t.Eq=a,t.eq=function(n){return n.eq},t.eqInt=r}(n["Data.Eq"]=n["Data.Eq"]||{}),function(t){"use strict";(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}).unsafeCompareImpl=function(n){return function(t){return function(e){return function(a){return function(r){return a<r?n:a===r?t:e}}}}}}(),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showIntImpl=function(n){return n.toString()}}(),function(t){"use strict";var e=n["Data.Show"],a=(n["Data.Symbol"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n){this.show=n}),r=new a(e.showIntImpl);t.Show=a,t.show=function(n){return n.show},t.showInt=r}(n["Data.Show"]=n["Data.Show"]||{}),function(t){"use strict";n["Data.Eq"],n["Data.Semigroup"],n["Data.Show"];var e=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),r=function(){function n(){}return n.value=new n,n}();t.LT=e,t.GT=a,t.EQ=r}(n["Data.Ordering"]=n["Data.Ordering"]||{}),function(t){"use strict";var e=n["Data.Ord.Unsafe"],a=n["Data.Ordering"],r=e.unsafeCompareImpl(a.LT.value)(a.EQ.value)(a.GT.value);t.unsafeCompare=r}(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}),function(t){"use strict";n["Data.Ord"];var e=n["Data.Eq"],a=n["Data.Ord.Unsafe"],r=n["Data.Ordering"],o=(n["Data.Ring"],n["Data.Semiring"],n["Data.Symbol"],n["Data.Unit"],n["Data.Void"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n,t){this.Eq0=n,this.compare=t}),i=new o(function(){return e.eqInt},a.unsafeCompare),u=function(n){return n.compare};t.Ord=o,t.compare=u,t.min=function(n){return function(t){return function(e){var a=u(n)(t)(e);if(a instanceof r.LT)return t;if(a instanceof r.EQ)return t;if(a instanceof r.GT)return e;throw new Error("Failed pattern match at Data.Ord (line 119, column 3 - line 122, column 12): "+[a.constructor.name])}}},t.ordInt=i}(n["Data.Ord"]=n["Data.Ord"]||{}),function(t){"use strict";n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"],n["Control.Apply"],n["Control.Bind"],n["Control.Category"],n["Control.Extend"],n["Control.Monad"],n["Control.MonadZero"],n["Control.Plus"],n["Data.Bounded"],n["Data.Eq"],n["Data.Function"],n["Data.Functor"],n["Data.Functor.Invariant"],n["Data.Monoid"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Show"],n["Data.Unit"],n.Prelude;var e=function(){function n(){}return n.value=new n,n}(),a=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Nothing=e,t.Just=a}(n["Data.Maybe"]=n["Data.Maybe"]||{}),function(t){"use strict";n["Control.Applicative"],n["Control.Bind"],n["Control.Monad"],n["Control.Semigroupoid"],n["Data.Bifunctor"],n["Data.Either"],n["Data.Functor"],n["Data.Identity"],n["Data.Maybe"],n["Data.Unit"],n.Effect,n["Effect.Ref"],n["Partial.Unsafe"],n.Prelude;var e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),a=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Loop=e,t.Done=a,t.tailRec=function(n){return function(t){return function(t){var r,o=!1;function i(r){if(!(r instanceof e)){if(r instanceof a)return o=!0,r.value0;throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 91, column 3 - line 91, column 25): "+[r.constructor.name])}t=n(r.value0)}for(;!o;)r=i(t);return r}(n(t))}}}(n["Control.Monad.Rec.Class"]=n["Control.Monad.Rec.Class"]||{}),function(n){"use strict";n._charAt=function(n){return function(t){return function(e){return function(a){return e>=0&&e<a.length?n(a.charAt(e)):t}}}},n.length=function(n){return n.length}}(n["Data.String.CodeUnits"]=n["Data.String.CodeUnits"]||{}),function(t){"use strict";var e=n["Data.String.CodeUnits"],a=(n["Control.Semigroupoid"],n["Data.Boolean"],n["Data.Eq"],n["Data.Function"],n["Data.HeytingAlgebra"],n["Data.Maybe"]),r=(n["Data.Ord"],n["Data.Ring"],n["Data.Semiring"],n["Data.String.Pattern"],n["Data.String.Unsafe"],n.Prelude,e._charAt(a.Just.create)(a.Nothing.value));t.charAt=r}(n["Data.String.CodeUnits"]=n["Data.String.CodeUnits"]||{}),function(t){"use strict";(n["Data.String.Common"]=n["Data.String.Common"]||{}).trim=function(n){return n.trim()}}(),function(t){"use strict";var e=n["Data.String.Common"];n["Data.Eq"],n["Data.Ordering"],n["Data.String.Pattern"],n.Prelude;t.trim=e.trim}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(t){"use strict";var e=n["Control.Monad.Rec.Class"],a=(n["Data.Eq"],n["Data.Maybe"]),r=n["Data.Ord"],o=(n["Data.Semiring"],n["Data.Show"]),i=(n["Data.String"],n["Data.String.CodeUnits"]),u=n["Data.String.Common"];n.Prelude;t.solve=function(n){return o.show(o.showInt)(function(n){var t=u.trim(n);return e.tailRec(function(n){var o=i.charAt(n.i)(t);if(o instanceof a.Nothing)return new e.Done(2*r.min(r.ordInt)(n.c0)(n.c1)|0);if(o instanceof a.Just)return new e.Loop({c0:"0"===o.value0?n.c0+1|0:n.c0,c1:"1"===o.value0?n.c1+1|0:n.c1,i:n.i+1|0});throw new Error("Failed pattern match at AtCoder.ABC120.C (line 21, column 7 - line 27, column 11): "+[o.constructor.name])})({c0:0,c1:0,i:0})}(n))}}(n["AtCoder.ABC120.C"]=n["AtCoder.ABC120.C"]||{}),function(t){"use strict";(n["Effect.Console"]=n["Effect.Console"]||{}).log=function(n){return function(){return console.log(n),{}}}}(),function(t){"use strict";var e=n["Effect.Console"];n["Data.Show"],n["Data.Unit"],n.Effect;t.log=e.log}(n["Effect.Console"]=n["Effect.Console"]||{}),function(t){"use strict";n["Node.Encoding"];var e=n["Data.Show"],a=(n.Prelude,function(){function n(){}return n.value=new n,n}()),r=function(){function n(){}return n.value=new n,n}(),o=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}(),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 e.Show(function(n){if(n instanceof a)return"ASCII";if(n instanceof r)return"UTF8";if(n instanceof o)return"UTF16LE";if(n instanceof i)return"UCS2";if(n instanceof u)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=a,t.UTF8=r,t.UTF16LE=o,t.UCS2=i,t.Base64=u,t.Latin1=c,t.Binary=f,t.Hex=s,t.showEncoding=l}(n["Node.Encoding"]=n["Node.Encoding"]||{}),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(t){"use strict";var e=n["Unsafe.Coerce"];t.unsafeCoerce=e.unsafeCoerce}(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}),function(t){"use strict";var e=n["Node.FS.Internal"],a=(n.Effect,n.Prelude,n["Unsafe.Coerce"].unsafeCoerce);t.mkEffect=a,t.unsafeRequireFS=e.unsafeRequireFS}(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}),function(t){"use strict";n["Control.Bind"],n["Control.Semigroupoid"],n["Data.DateTime"],n["Data.DateTime.Instant"],n["Data.EuclideanRing"],n["Data.Function"],n["Data.Function.Uncurried"],n["Data.Functor"],n["Data.Int"],n["Data.Maybe"],n["Data.Nullable"];var e=n["Data.Show"],a=(n["Data.Time.Duration"],n.Effect,n["Node.Buffer"],n["Node.Encoding"]),r=(n["Node.FS"],n["Node.FS.Internal"]),o=(n["Node.FS.Perms"],n["Node.FS.Stats"],n["Node.Path"],n.Prelude,r.unsafeRequireFS);t.readTextFile=function(n){return function(t){return r.mkEffect(function(r){return o.readFileSync(t,{encoding:e.show(a.showEncoding)(n)})})}}}(n["Node.FS.Sync"]=n["Node.FS.Sync"]||{}),function(t){"use strict";var e=n["AtCoder.ABC120.C"],a=(n["Control.Applicative"],n["Control.Bind"],n.Effect,n["Effect.Console"]),r=n["Node.Encoding"],o=n["Node.FS.Sync"];n.Prelude;t.main=function(){var n=o.readTextFile(r.UTF8.value)("/dev/stdin")(),t=e.solve(n);return a.log(t)()}}(n.Main=n.Main||{}),n.Main.main();
},{}]},{},["Focm"], null)

Measured memory_bytes: 10708