Problem:
Score : 100 points

Problem Statement

You are given a positive integer N.
Find the minimum positive integer divisible by both 2 and N.

Constraints

1 \leq N \leq 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N

Output

Print the minimum positive integer divisible by both 2 and N.

Sample Input 1

3

Sample Output 1

6

6 is divisible by both 2 and 3.
Also, there is no positive integer less than 6 that is divisible by both 2 and 3.
Thus, the answer is 6.

Sample Input 2

10

Sample Output 2

10

Sample Input 3

999999999

Sample Output 3

1999999998

Solution in JavaScript (node.js v5.12) (judge verdict: Accepted)

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";var t=function(n){this.compose=n},r=new t(function(n){return function(t){return function(r){return n(t(r))}}});n.compose=function(n){return n.compose},n.Semigroupoid=t,n.semigroupoidFn=r}(n["Control.Semigroupoid"]=n["Control.Semigroupoid"]||{}),function(t){"use strict";var r=n["Control.Semigroupoid"],e=function(n,t){this.Semigroupoid0=n,this.identity=t},o=new e(function(){return r.semigroupoidFn},function(n){return n});t.Category=e,t.identity=function(n){return n.identity},t.categoryFn=o}(n["Control.Category"]=n["Control.Category"]||{}),function(t){"use strict";(n["Data.Boolean"]=n["Data.Boolean"]||{}).otherwise=!0}(),function(t){"use strict";n["Control.Category"],n["Data.Boolean"],n["Data.Ord"],n["Data.Ring"];t.flip=function(n){return function(t){return function(r){return n(r)(t)}}},t.const=function(n){return function(t){return n}}}(n["Data.Function"]=n["Data.Function"]||{}),function(t){"use strict";(n["Data.Unit"]=n["Data.Unit"]||{}).unit={}}(),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showIntImpl=function(n){return n.toString()}}(),function(t){"use strict";var r=n["Data.Show"],e=(n["Data.Symbol"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n){this.show=n}),o=new e(r.showIntImpl);t.Show=e,t.show=function(n){return n.show},t.showInt=o}(n["Data.Show"]=n["Data.Show"]||{}),function(t){"use strict";var r=n["Data.Unit"];n["Data.Show"];t.unit=r.unit}(n["Data.Unit"]=n["Data.Unit"]||{}),function(t){"use strict";n["Data.Functor"],n["Control.Semigroupoid"];var r=n["Data.Function"],e=n["Data.Unit"],o=function(n){return n.map};t.Functor=function(n){this.map=n},t.map=o,t.void=function(n){return o(n)(r.const(e.unit))}}(n["Data.Functor"]=n["Data.Functor"]||{}),function(t){"use strict";n["Control.Apply"];var r=n["Control.Category"],e=n["Data.Function"],o=n["Data.Functor"],i=function(n){return n.apply};t.Apply=function(n,t){this.Functor0=n,this.apply=t},t.apply=i,t.applySecond=function(n){return function(t){return function(a){return i(n)(o.map(n.Functor0())(e.const(r.identity(r.categoryFn)))(t))(a)}}}}(n["Control.Apply"]=n["Control.Apply"]||{}),function(t){"use strict";var r=n["Control.Apply"],e=(n["Data.Functor"],n["Data.Unit"],function(n){return n.pure});t.Applicative=function(n,t){this.Apply0=n,this.pure=t},t.pure=e,t.liftA1=function(n){return function(t){return function(o){return r.apply(n.Apply0())(e(n)(t))(o)}}}}(n["Control.Applicative"]=n["Control.Applicative"]||{}),function(t){"use strict";n["Control.Bind"],n["Control.Applicative"],n["Control.Apply"],n["Control.Category"];var r=n["Data.Function"],e=(n["Data.Functor"],n["Data.Unit"],function(n){return n.bind}),o=function(n){return r.flip(e(n))};t.Bind=function(n,t){this.Apply0=n,this.bind=t},t.bind=e,t.bindFlipped=o,t.composeKleisliFlipped=function(n){return function(t){return function(r){return function(e){return o(n)(t)(r(e))}}}}}(n["Control.Bind"]=n["Control.Bind"]||{}),function(t){"use strict";var r=n["Control.Applicative"],e=(n["Control.Apply"],n["Control.Bind"]);n["Data.Functor"],n["Data.Unit"];t.Monad=function(n,t){this.Applicative0=n,this.Bind1=t},t.ap=function(n){return function(t){return function(o){return e.bind(n.Bind1())(t)(function(t){return e.bind(n.Bind1())(o)(function(e){return r.pure(n.Applicative0())(t(e))})})}}}}(n["Control.Monad"]=n["Control.Monad"]||{}),function(n){"use strict";n.foldrArray=function(n){return function(t){return function(r){for(var e=t,o=r.length-1;o>=0;o--)e=n(r[o])(e);return e}}},n.foldlArray=function(n){return function(t){return function(r){for(var e=t,o=r.length,i=0;i<o;i++)e=n(e)(r[i]);return e}}}}(n["Data.Foldable"]=n["Data.Foldable"]||{}),function(t){"use strict";n["Data.Semigroup"],n["Data.Symbol"],n["Data.Unit"],n["Data.Void"],n["Record.Unsafe"],n["Type.Data.RowList"];t.Semigroup=function(n){this.append=n},t.append=function(n){return n.append}}(n["Data.Semigroup"]=n["Data.Semigroup"]||{}),function(t){"use strict";n["Data.Boolean"],n["Data.Eq"],n["Data.EuclideanRing"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Symbol"],n["Data.Unit"],n["Record.Unsafe"],n["Type.Data.RowList"];t.Monoid=function(n,t){this.Semigroup0=n,this.mempty=t},t.mempty=function(n){return n.mempty}}(n["Data.Monoid"]=n["Data.Monoid"]||{}),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 r=function(){function n(){}return n.value=new n,n}(),e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Nothing=r,t.Just=e,t.maybe=function(n){return function(t){return function(o){if(o instanceof r)return n;if(o instanceof e)return t(o.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,t.constructor.name,o.constructor.name])}}}}(n["Data.Maybe"]=n["Data.Maybe"]||{}),function(t){"use strict";var r=n["Data.Foldable"],e=(n["Control.Alt"],n["Control.Applicative"]),o=n["Control.Apply"],i=(n["Control.Bind"],n["Control.Category"],n["Control.Plus"],n["Control.Semigroupoid"],n["Data.Eq"],n["Data.Function"],n["Data.Functor"],n["Data.HeytingAlgebra"],n["Data.Maybe"],n["Data.Maybe.First"],n["Data.Maybe.Last"],n["Data.Monoid"]),a=(n["Data.Monoid.Additive"],n["Data.Monoid.Conj"],n["Data.Monoid.Disj"],n["Data.Monoid.Dual"],n["Data.Monoid.Endo"],n["Data.Monoid.Multiplicative"],n["Data.Newtype"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"]),u=(n["Data.Semiring"],n["Data.Unit"]),f=(n.Prelude,function(n,t,r){this.foldMap=n,this.foldl=t,this.foldr=r}),c=function(n){return n.foldr},l=function(n){return function(t){return function(r){return c(n)(function(n){return function(e){return a.append(t.Semigroup0())(r(n))(e)}})(i.mempty(t))}}},s=new f(function(n){return l(s)(n)},r.foldlArray,r.foldrArray);t.Foldable=f,t.foldr=c,t.foldl=function(n){return n.foldl},t.foldMap=function(n){return n.foldMap},t.foldMapDefaultR=l,t.traverse_=function(n){return function(t){return function(r){return c(t)(function(t){return o.applySecond(n.Apply0())(r(t))})(e.pure(n)(u.unit))}}},t.foldableArray=s}(n["Data.Foldable"]=n["Data.Foldable"]||{}),function(t){"use strict";n["Control.Alt"];var r=n["Control.Applicative"],e=n["Control.Apply"],o=n["Control.Bind"],i=(n["Control.Extend"],n["Control.Monad"],n["Control.Semigroupoid"],n["Data.Bifoldable"],n["Data.Bifunctor"],n["Data.Bitraversable"],n["Data.Bounded"],n["Data.Eq"],n["Data.Foldable"],n["Data.FoldableWithIndex"],n["Data.Function"],n["Data.Functor"]),a=(n["Data.Functor.Invariant"],n["Data.FunctorWithIndex"],n["Data.Maybe"]),u=(n["Data.Monoid"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Show"],n["Data.Traversable"],n["Data.TraversableWithIndex"],n["Data.Unit"],n.Prelude,function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}()),f=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),c=new i.Functor(function(n){return function(t){if(t instanceof u)return new u(t.value0);if(t instanceof f)return new f(n(t.value0));throw new Error("Failed pattern match at Data.Either (line 38, column 8 - line 38, column 52): "+[t.constructor.name])}}),l=function(n){return function(t){return function(r){if(r instanceof u)return n(r.value0);if(r instanceof f)return t(r.value0);throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},s=new e.Apply(function(){return c},function(n){return function(t){if(n instanceof u)return new u(n.value0);if(n instanceof f)return i.map(c)(n.value0)(t);throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 82, column 41): "+[n.constructor.name,t.constructor.name])}}),d=new o.Bind(function(){return s},l(function(n){return function(t){return new u(n)}})(function(n){return function(t){return t(n)}})),p=new r.Applicative(function(){return s},f.create);t.Left=u,t.Right=f,t.either=l,t.note=function(n){return a.maybe(new u(n))(f.create)},t.functorEither=c,t.applyEither=s,t.applicativeEither=p,t.bindEither=d}(n["Data.Either"]=n["Data.Either"]||{}),function(t){"use strict";(n["Data.Int"]=n["Data.Int"]||{}).fromStringAsImpl=function(n){return function(t){return function(r){var e;e=r<11?"[0-"+(r-1).toString()+"]":11===r?"[0-9a]":"[0-9a-"+String.fromCharCode(86+r)+"]";var o=new RegExp("^[\\+\\-]?"+e+"+$","i");return function(e){if(o.test(e)){var i=parseInt(e,r);return(0|i)===i?n(i):t}return t}}}}}(),function(t){"use strict";var r=n["Data.Int"],e=(n["Control.Category"],n["Control.Semigroupoid"],n["Data.Boolean"],n["Data.Bounded"],n["Data.CommutativeRing"],n["Data.DivisionRing"],n["Data.Eq"],n["Data.EuclideanRing"],n["Data.HeytingAlgebra"],n["Data.Int.Bits"],n["Data.Maybe"]),o=(n["Data.Ord"],n["Data.Ordering"],n["Data.Ring"],n["Data.Semiring"],n["Data.Show"],n.Global,n.Math,n.Prelude,r.fromStringAsImpl(e.Just.create)(e.Nothing.value)),i=o(10);t.fromString=i,t.fromStringAs=o,t.even=function(n){return 0==(1&n)}}(n["Data.Int"]=n["Data.Int"]||{}),function(t){"use strict";(n["Data.String.Common"]=n["Data.String.Common"]||{}).trim=function(n){return n.trim()}}(),function(t){"use strict";var r=n["Data.String.Common"];n["Data.Eq"],n["Data.Ordering"],n["Data.String.Pattern"],n.Prelude;t.trim=r.trim}(n["Data.String.Common"]=n["Data.String.Common"]||{}),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(t){"use strict";var r=n.Effect,e=n["Control.Applicative"],o=n["Control.Apply"],i=n["Control.Bind"],a=n["Control.Monad"],u=n["Data.Functor"],f=(n["Data.Monoid"],n["Data.Semigroup"],n.Prelude,new a.Monad(function(){return s},function(){return c})),c=new i.Bind(function(){return l},r.bindE),l=new o.Apply(function(){return d},a.ap(f)),s=new e.Applicative(function(){return l},r.pureE),d=new u.Functor(e.liftA1(s));t.functorEffect=d,t.applyEffect=l,t.applicativeEffect=s,t.bindEffect=c,t.monadEffect=f}(n.Effect=n.Effect||{}),function(n){"use strict";var t=function(){var n={},t="Pure",r="Throw",e="Catch",o="Sync",i="Async",a="Bind",u="Bracket",f="Fork",c="Sequential",l="Map",s="Apply",d="Alt",p="Cons",h="Resume",D="Release",m="Finalizer",w="Finalized",C="Forked";function v(n,t,r,e){this.tag=n,this._1=t,this._2=r,this._3=e}function g(n){var t=function(t,r,e){return new v(n,t,r,e)};return t.tag=n,t}function E(n){return new v(t,void 0)}function A(n){try{n()}catch(t){setTimeout(function(){throw t},0)}}function y(n,t,r){try{return t(r())}catch(e){return n(e)}}function _(n,t,r){try{return t(r)()}catch(e){return r(n(e))(),E}}var S=function(){var n=1024,t=0,r=0,e=new Array(n),o=!1;function i(){var i;for(o=!0;0!==t;)t--,i=e[r],e[r]=void 0,r=(r+1)%n,i();o=!1}return{isDraining:function(){return o},enqueue:function(a){var u;t===n&&(u=o,i(),o=u),e[(r+t)%n]=a,t++,o||i()}}}();var b=0,F=1,P=2,M=3,B=4,k=5,U=6;function R(n,l,s){var d=0,C=b,g=s,E=null,N=null,I=null,T=null,x=null,q=0,O=0,W=null,j=!0;function H(s){for(var O,z,K;;)switch(O=null,z=null,K=null,C){case P:C=F,g=I(g),null===T?I=null:(I=T._1,T=T._2);break;case M:n.isLeft(g)?(C=k,E=g,g=null):null===I?C=k:(C=P,g=n.fromRight(g));break;case F:switch(g.tag){case a:I&&(T=new v(p,I,T)),I=g._2,C=F,g=g._1;break;case t:null===I?(C=k,g=n.right(g._1)):(C=P,g=g._1);break;case o:C=M,g=y(n.left,n.right,g._1);break;case i:return C=B,void(g=_(n.left,g._1,function(n){return function(){d===s&&(d++,S.enqueue(function(){d===s+1&&(C=M,g=n,H(d))}))}}));case r:C=k,E=n.left(g._1),g=null;break;case e:x=new v(p,g,null===I?x:new v(p,new v(h,I,T),x,N),N),I=null,T=null,C=F,g=g._1;break;case u:q++,x=new v(p,g,null===I?x:new v(p,new v(h,I,T),x,N),N),I=null,T=null,C=F,g=g._1;break;case f:C=M,O=R(n,l,g._2),l&&l.register(O),g._1&&O.run(),g=n.right(O);break;case c:C=F,g=L(n,l,g._1)}break;case k:if(I=null,T=null,null===x)C=U,g=N||E||g;else switch(O=x._3,K=x._1,x=x._2,K.tag){case e:N&&N!==O?C=k:E&&(C=F,g=K._2(n.fromLeft(E)),E=null);break;case h:N&&N!==O||E?C=k:(I=K._1,T=K._2,C=P,g=n.fromRight(g));break;case u:q--,null===E&&(z=n.fromRight(g),x=new v(p,new v(D,K._2,z),x,O),(N===O||q>0)&&(C=F,g=K._3(z)));break;case D:q++,x=new v(p,new v(w,g,E),x,N),C=F,g=N&&N!==O?K._1.killed(n.fromLeft(N))(K._2):E?K._1.failed(n.fromLeft(E))(K._2):K._1.completed(n.fromRight(g))(K._2),E=null;break;case m:q++,x=new v(p,new v(w,g,E),x,N),C=F,g=K._1;break;case w:q--,C=k,g=K._1,E=K._2}break;case U:for(var J in W)W.hasOwnProperty(J)&&(j=j&&W[J].rethrow,A(W[J].handler(g)));return W=null,void(N&&E?setTimeout(function(){throw n.fromLeft(E)},0):n.isLeft(g)&&j&&setTimeout(function(){if(j)throw n.fromLeft(g)},0));case b:C=F;break;case B:return}}function z(n){return function(){if(C===U)return j=j&&n.rethrow,n.handler(g)(),function(){};var t=O++;return(W=W||{})[t]=n,function(){null!==W&&delete W[t]}}}return{kill:function(t,r){return function(){if(C===U)return r(n.right(void 0))(),function(){};var e=z({rethrow:!1,handler:function(){return r(n.right(void 0))}})();switch(C){case b:N=n.left(t),C=U,g=N,H(d);break;case B:null===N&&(N=n.left(t)),0===q&&(C===B&&(x=new v(p,new v(m,g(t)),x,N)),C=k,g=null,E=null,H(++d));break;default:null===N&&(N=n.left(t)),0===q&&(C=k,g=null,E=null)}return e}},join:function(n){return function(){var t=z({rethrow:!1,handler:n})();return C===b&&H(d),t}},onComplete:z,isSuspended:function(){return C===b},run:function(){C===b&&(S.isDraining()?H(d):S.enqueue(function(){H(d)}))}}}function N(t,r,e,o){var a=0,u={},f=0,c={},h=new Error("[ParAff] Early exit"),D=null,m=n;function w(r,e,o){var i,a,f=e,c=null,h=null,D=0,m={};n:for(;;)switch(i=null,f.tag){case C:if(f._3===n&&(i=u[f._1],m[D++]=i.kill(r,function(n){return function(){0===--D&&o(n)()}})),null===c)break n;f=c._2,null===h?c=null:(c=h._1,h=h._2);break;case l:f=f._2;break;case s:case d:c&&(h=new v(p,c,h)),c=f,f=f._1}if(0===D)o(t.right(void 0))();else for(a=0,i=D;a<i;a++)m[a]=m[a]();return m}function g(r){return function(e){return function(){delete u[r._1],r._3=e,function r(e,i,a){var u,p,m,C,v,g;for(t.isLeft(e)?(u=e,p=null):(p=e,u=null);;){if(m=null,C=null,v=null,g=null,null!==D)return;if(null===i)return void o(u||p)();if(i._3!==n)return;switch(i.tag){case l:null===u?(i._3=t.right(i._1(t.fromRight(p))),p=i._3):i._3=u;break;case s:if(m=i._1._3,C=i._2._3,u){if(i._3=u,v=!0,g=f++,c[g]=w(h,u===m?i._2:i._1,function(){return function(){delete c[g],v?v=!1:null===a?r(u,null,null):r(u,a._1,a._2)}}),v)return void(v=!1)}else{if(m===n||C===n)return;p=t.right(t.fromRight(m)(t.fromRight(C))),i._3=p}break;case d:if(m=i._1._3,C=i._2._3,m===n&&t.isLeft(C)||C===n&&t.isLeft(m))return;if(m!==n&&t.isLeft(m)&&C!==n&&t.isLeft(C))u=p===m?C:m,p=null,i._3=u;else if(i._3=p,v=!0,g=f++,c[g]=w(h,p===m?i._2:i._1,function(){return function(){delete c[g],v?v=!1:null===a?r(p,null,null):r(p,a._1,a._2)}}),v)return void(v=!1)}null===a?i=null:(i=a._1,a=a._2)}}(e,r._2._1,r._2._2)}}}return function(){var o,i,f=F,c=e,h=null,D=null;n:for(;;)switch(o=null,i=null,f){case F:switch(c.tag){case l:h&&(D=new v(p,h,D)),h=new v(l,c._1,n,n),c=c._2;break;case s:h&&(D=new v(p,h,D)),h=new v(s,n,c._2,n),c=c._1;break;case d:h&&(D=new v(p,h,D)),h=new v(d,n,c._2,n),c=c._1;break;default:i=a++,f=k,o=c,c=new v(C,i,new v(p,h,D),n),(o=R(t,r,o)).onComplete({rethrow:!1,handler:g(c)})(),u[i]=o,r&&r.register(o)}break;case k:if(null===h)break n;h._1===n?(h._1=c,f=F,c=h._2,h._2=n):(h._2=c,c=h,null===D?h=null:(h=D._1,D=D._2))}for(m=c,i=0;i<a;i++)u[i].run()}(),function(n){return new v(i,function(r){return function(){return function(n,r){var e;for(var o in D=t.left(n),c)if(c.hasOwnProperty(o))for(o in e=c[o])e.hasOwnProperty(o)&&e[o]();c=null;var a=w(n,m,r);return function(n){return new v(i,function(n){return function(){for(var n in a)a.hasOwnProperty(n)&&a[n]();return E}})}}(n,r)}})}}function L(n,t,r){return new v(i,function(e){return function(){return N(n,t,r,e)}})}return v.EMPTY=n,v.Pure=g(t),v.Throw=g(r),v.Catch=g(e),v.Sync=g(o),v.Async=g(i),v.Bind=g(a),v.Bracket=g(u),v.Fork=g(f),v.Seq=g(c),v.ParMap=g(l),v.ParApply=g(s),v.ParAlt=g(d),v.Fiber=R,v.Supervisor=function(n){var t={},r=0,e=0;return{register:function(n){var o=r++;n.onComplete({rethrow:!0,handler:function(n){return function(){e--,delete t[o]}}}),t[o]=n,e++},isEmpty:function(){return 0===e},killAll:function(i,a){return function(){var u=0,f={};function c(r){f[r]=t[r].kill(i,function(t){return function(){delete f[r],u--,n.isLeft(t)&&n.fromLeft(t)&&setTimeout(function(){throw n.fromLeft(t)},0),0===u&&a()}})()}for(var l in t)t.hasOwnProperty(l)&&(u++,c(l));return t={},r=0,e=0,function(n){return new v(o,function(){for(var n in f)f.hasOwnProperty(n)&&f[n]()})}}}}},v.Scheduler=S,v.nonCanceler=E,v}();n._pure=t.Pure,n._map=function(n){return function(r){return r.tag===t.Pure.tag?t.Pure(n(r._1)):t.Bind(r,function(r){return t.Pure(n(r))})}},n._bind=function(n){return function(r){return t.Bind(n,r)}},n._liftEffect=t.Sync,n._parAffMap=function(n){return function(r){return t.ParMap(n,r)}},n._parAffApply=function(n){return function(r){return t.ParApply(n,r)}},n.makeAff=t.Async,n._makeFiber=function(n,r){return function(){return t.Fiber(n,null,r)}},n._sequential=t.Seq}(n["Effect.Aff"]=n["Effect.Aff"]||{}),function(t){"use strict";n["Control.Category"],n["Control.Monad"],n.Effect;t.liftEffect=function(n){return n.liftEffect},t.MonadEffect=function(n,t){this.Monad0=n,this.liftEffect=t}}(n["Effect.Class"]=n["Effect.Class"]||{}),function(n){"use strict";n.new=function(n){return function(){return{value:n}}},n.read=function(n){return function(){return n.value}},n.write=function(n){return function(t){return function(){return t.value=n,{}}}}}(n["Effect.Ref"]=n["Effect.Ref"]||{}),function(t){"use strict";var r=n["Effect.Ref"];n["Data.Function"],n["Data.Functor"],n.Effect,n.Prelude;t.new=r.new,t.read=r.read,t.write=r.write}(n["Effect.Ref"]=n["Effect.Ref"]||{}),function(t){"use strict";n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"],n["Control.Apply"],n["Control.Bind"],n["Control.Monad.Cont.Trans"],n["Control.Monad.Except.Trans"],n["Control.Monad.Maybe.Trans"],n["Control.Monad.Reader.Trans"],n["Control.Monad.Writer.Trans"],n["Control.Plus"],n["Control.Semigroupoid"],n["Data.Either"],n["Data.Function"],n["Data.Functor"],n["Data.Functor.Compose"],n["Data.Maybe"],n["Data.Newtype"],n["Data.Unit"],n["Effect.Class"],n["Effect.Ref"],n.Prelude;t.parallel=function(n){return n.parallel},t.sequential=function(n){return n.sequential},t.Parallel=function(n,t,r,e){this.Applicative1=n,this.Monad0=t,this.parallel=r,this.sequential=e}}(n["Control.Parallel.Class"]=n["Control.Parallel.Class"]||{}),function(t){"use strict";n["Control.Alternative"],n["Control.Apply"];var r=n["Control.Category"],e=n["Control.Parallel.Class"],o=(n["Control.Semigroupoid"],n["Data.Foldable"]),i=(n["Data.Traversable"],n.Prelude,function(n){return function(t){return function(r){return function(i){return e.sequential(n)(o.traverse_(n.Applicative1())(t)(function(t){return e.parallel(n)(r(t))})(i))}}}});t.parTraverse_=i,t.parSequence_=function(n){return function(t){return i(n)(t)(r.identity(r.categoryFn))}}}(n["Control.Parallel"]=n["Control.Parallel"]||{}),function(n){"use strict";n.error=function(n){return new Error(n)},n.throwException=function(n){return function(){throw n}}}(n["Effect.Exception"]=n["Effect.Exception"]||{}),function(t){"use strict";var r=n["Effect.Exception"];n["Control.Applicative"],n["Control.Semigroupoid"],n["Data.Either"],n["Data.Functor"],n["Data.Maybe"],n["Data.Show"],n.Effect,n.Prelude;t.throw=function(n){return r.throwException(r.error(n))}}(n["Effect.Exception"]=n["Effect.Exception"]||{}),function(t){"use strict";(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}).unsafePartial=function(n){return n()}}(),function(t){"use strict";(n["Partial"]=n["Partial"]||{}).crashWith=function(){return function(n){throw new Error(n)}}}(),function(t){"use strict";var r=n.Partial;t.crashWith=r.crashWith}(n.Partial=n.Partial||{}),function(t){"use strict";var r=n["Partial.Unsafe"],e=n.Partial;t.unsafeCrashWith=function(n){return r.unsafePartial(function(t){return e.crashWith(t)(n)})}}(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}),function(t){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(t){"use strict";var r=n["Unsafe.Coerce"];t.unsafeCoerce=r.unsafeCoerce}(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}),function(t){"use strict";var r=n["Effect.Aff"],e=(n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"]),o=n["Control.Apply"],i=n["Control.Bind"],a=(n["Control.Lazy"],n["Control.Monad"]),u=(n["Control.Monad.Error.Class"],n["Control.Monad.Rec.Class"],n["Control.Parallel"]),f=n["Control.Parallel.Class"],c=(n["Control.Plus"],n["Control.Semigroupoid"],n["Data.Either"]),l=n["Data.Foldable"],s=n["Data.Function"],d=(n["Data.Function.Uncurried"],n["Data.Functor"]),p=n["Data.Monoid"],h=(n["Data.Newtype"],n["Data.Semigroup"]),D=(n["Data.Time.Duration"],n["Data.Unit"]),m=n.Effect,w=n["Effect.Class"],C=(n["Effect.Exception"],n["Effect.Unsafe"],n["Partial.Unsafe"]),v=(n.Prelude,n["Unsafe.Coerce"]),g=new d.Functor(r._parAffMap),E=new d.Functor(r._map),A={isLeft:function(n){if(n instanceof c.Left)return!0;if(n instanceof c.Right)return!1;throw new Error("Failed pattern match at Effect.Aff (line 390, column 12 - line 392, column 20): "+[n.constructor.name])},fromLeft:function(n){if(n instanceof c.Left)return n.value0;if(n instanceof c.Right)return C.unsafeCrashWith("unsafeFromLeft: Right");throw new Error("Failed pattern match at Effect.Aff (line 395, column 20 - line 399, column 3): "+[n.constructor.name])},fromRight:function(n){if(n instanceof c.Right)return n.value0;if(n instanceof c.Left)return C.unsafeCrashWith("unsafeFromRight: Left");throw new Error("Failed pattern match at Effect.Aff (line 400, column 21 - line 402, column 31): "+[n.constructor.name])},left:c.Left.create,right:c.Right.create},y=function(n){return function(){var t=function(n){return r._makeFiber(A,n)}(n)();return t.run(),t}},_=new o.Apply(function(){return g},r._parAffApply),S=new a.Monad(function(){return P},function(){return b}),b=new i.Bind(function(){return F},r._bind),F=new o.Apply(function(){return E},a.ap(S)),P=new e.Applicative(function(){return F},r._pure),M=new w.MonadEffect(function(){return S},r._liftEffect),B=new f.Parallel(function(){return k},function(){return S},v.unsafeCoerce,r._sequential),k=new e.Applicative(function(){return _},function(n){return f.parallel(B)(e.pure(P)(n))}),U=new h.Semigroup(function(n){return function(t){return function(r){return u.parSequence_(B)(l.foldableArray)([n(r),t(r)])}}}),R=s.const(e.pure(P)(D.unit)),N=new p.Monoid(function(){return U},R);t.launchAff=y,t.launchAff_=function(n){return d.void(m.functorEffect)(y(n))},t.nonCanceler=R,t.functorAff=E,t.applyAff=F,t.applicativeAff=P,t.bindAff=b,t.monadAff=S,t.monadEffectAff=M,t.functorParAff=g,t.applyParAff=_,t.applicativeParAff=k,t.parallelAff=B,t.semigroupCanceler=U,t.monoidCanceler=N,t.makeAff=r.makeAff}(n["Effect.Aff"]=n["Effect.Aff"]||{}),function(t){"use strict";n["Node.Encoding"];var r=n["Data.Show"],e=(n.Prelude,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}(),a=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),s=new r.Show(function(n){if(n instanceof e)return"ASCII";if(n instanceof o)return"UTF8";if(n instanceof i)return"UTF16LE";if(n instanceof a)return"UCS2";if(n instanceof u)return"Base64";if(n instanceof f)return"Latin1";if(n instanceof c)return"Binary";if(n instanceof l)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});t.ASCII=e,t.UTF8=o,t.UTF16LE=i,t.UCS2=a,t.Base64=u,t.Latin1=f,t.Binary=c,t.Hex=l,t.encodingToNode=function(n){if(n instanceof e)return"ascii";if(n instanceof o)return"utf8";if(n instanceof i)return"utf16le";if(n instanceof a)return"ucs2";if(n instanceof u)return"base64";if(n instanceof f)return"latin1";if(n instanceof c)return"binary";if(n instanceof l)return"hex";throw new Error("Failed pattern match at Node.Encoding (line 31, column 1 - line 31, column 37): "+[n.constructor.name])},t.showEncoding=s}(n["Node.Encoding"]=n["Node.Encoding"]||{}),function(t){"use strict";(n["Node.Process"]=n["Node.Process"]||{}).process=process}(),function(n){"use strict";n.readChunkImpl=function(n){return function(t){return function(r){if(r instanceof Buffer)return t(r);if("string"==typeof r)return n(r);throw new Error("Node.Stream.readChunkImpl: Unrecognised chunk type; expected String or Buffer, got: "+r)}}},n.onDataEitherImpl=function(n){return function(t){return function(r){return function(){t.on("data",function(t){r(n(t))()})}}}},n.onEnd=function(n){return function(t){return function(){n.on("end",t)}}},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(e){return function(){return n.write(r,t,e)}}}}}}(n["Node.Stream"]=n["Node.Stream"]||{}),function(t){"use strict";(n["Node.Buffer"]=n["Node.Buffer"]||{}).toStringImpl=function(n){return function(t){return function(){return t.toString(n)}}}}(),function(t){"use strict";var r=n["Node.Buffer"],e=(n["Control.Semigroupoid"],n["Data.ArrayBuffer.Types"],n["Data.Maybe"],n["Data.Show"],n.Effect,n["Node.Encoding"]);n.Prelude;t.toString=function(n){return r.toStringImpl(e.encodingToNode(n))}}(n["Node.Buffer"]=n["Node.Buffer"]||{}),function(t){"use strict";var r=n["Node.Stream"],e=n["Control.Applicative"],o=n["Control.Bind"],i=n["Data.Either"],a=(n["Data.Functor"],n["Data.Maybe"],n["Data.Show"]),u=n.Effect,f=n["Effect.Exception"],c=n["Node.Buffer"],l=n["Node.Encoding"],s=(n.Prelude,r.readChunkImpl(i.Left.create)(i.Right.create)),d=function(n){return function(t){return r.onDataEitherImpl(s)(n)(t)}},p=function(n){return function(t){return d(n)(o.composeKleisliFlipped(u.bindEffect)(t)(function(n){if(n instanceof i.Left)return f.throw("Stream encoding should not be set");if(n instanceof i.Right)return e.pure(u.applicativeEffect)(n.value0);throw new Error("Failed pattern match at Node.Stream (line 94, column 5 - line 98, column 17): "+[n.constructor.name])}))}};t.onData=p,t.onDataString=function(n){return function(t){return function(r){return p(n)(o.composeKleisliFlipped(u.bindEffect)(r)(c.toString(t)))}}},t.onDataEither=d,t.writeString=function(n){return function(t){return r.writeStringImpl(n)(a.show(l.showEncoding)(t))}},t.onEnd=r.onEnd}(n["Node.Stream"]=n["Node.Stream"]||{}),function(t){"use strict";var r=n["Node.Process"],e=(n["Data.Functor"],n["Data.Maybe"],n["Data.Posix"],n["Data.Posix.Signal"],n.Effect,n["Foreign.Object"],n["Node.Platform"],n["Node.Stream"],n.Prelude,n["Unsafe.Coerce"],r.process.stdout),o=r.process.stdin;t.stdin=o,t.stdout=e}(n["Node.Process"]=n["Node.Process"]||{}),function(t){"use strict";var r=n["Control.Applicative"],e=n["Control.Bind"],o=n["Control.Category"],i=n["Data.Boolean"],a=n["Data.Either"],u=n["Data.Functor"],f=n["Data.Int"],c=n["Data.Monoid"],l=(n["Data.Semigroup"],n["Data.Semiring"],n["Data.Show"]),s=(n["Data.String"],n["Data.String.Common"]),d=n["Data.Unit"],p=n.Effect,h=n["Effect.Aff"],D=n["Effect.Class"],m=n["Effect.Ref"],w=n["Node.Encoding"],C=n["Node.Process"],v=n["Node.Stream"],g=n["Partial.Unsafe"],E=(n.Prelude,function(n){return a.either(function(n){return g.unsafeCrashWith(n)})(o.identity(o.categoryFn))(e.bind(a.bindEither)(a.note("n")(f.fromString(s.trim(n))))(function(n){return r.pure(a.applicativeEither)(l.show(l.showInt)(function(n){if(f.even(n))return n;if(i.otherwise)return 2*n|0;throw new Error("Failed pattern match at ABC102A (line 51, column 1 - line 51, column 21): "+[n.constructor.name])}(n))+"\n")}))}),A=h.makeAff(function(n){return function(){var t=m.new("")();return v.onDataString(C.stdin)(w.UTF8.value)(function(n){return function(){var r=m.read(t)();return m.write(r+n)(t)()}})(),v.onEnd(C.stdin)(function(){var e=m.read(t)();return n(r.pure(a.applicativeEither)(e))()})(),c.mempty(h.monoidCanceler)}}),y=h.launchAff_(e.bind(h.bindAff)(A)(function(n){return e.bind(h.bindAff)(r.pure(h.applicativeAff)(E(n)))(function(n){return D.liftEffect(h.monadEffectAff)((t=n,u.void(p.functorEffect)(v.writeString(C.stdout)(w.UTF8.value)(t)(r.pure(p.applicativeEffect)(d.unit)))));var t})}));t.main=y,t.solve=E}(n.ABC102A=n.ABC102A||{}),n.ABC102A.main();
},{}]},{},["Focm"], null)