Problem:
Score: 100 points

Problem Statement

We held two competitions: Coding Contest and Robot Maneuver.

In each competition, the contestants taking the 3-rd, 2-nd, and 1-st places receive 100000, 200000, and 300000 yen (the currency of Japan), respectively. Furthermore, a contestant taking the first place in both competitions receives an additional 400000 yen.

DISCO-Kun took the X-th place in Coding Contest and the Y-th place in Robot Maneuver.
Find the total amount of money he earned.

Constraints

1 \leq X \leq 205

1 \leq Y \leq 205

X and Y are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

Print the amount of money DISCO-Kun earned, as an integer.

Sample Input 1

1 1

Sample Output 1

1000000

In this case, he earned 300000 yen in Coding Contest and another 300000 yen in Robot Maneuver. Furthermore, as he won both competitions, he got an additional 400000 yen.
In total, he made 300000 + 300000 + 400000 = 1000000 yen.

Sample Input 2

3 101

Sample Output 2

100000

In this case, he earned 100000 yen in Coding Contest.

Sample Input 3

4 4

Sample Output 3

0

In this case, unfortunately, he was the highest-ranked contestant without prize money in both competitions.

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

module.exports=function(r){var t={};function e(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return r[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var i in r)e.d(n,i,function(t){return r[t]}.bind(null,i));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=0)}([function(r,t,e){"use strict";var n=e(1);e(2)(n.readFileSync("/dev/stdin","utf8"))},function(r,t){r.exports=require("fs")},function(r,t,e){"use strict";var n=e(3),i=e(5);r.exports=function(r){var t=new n(r);i(t)}},function(r,t,e){"use strict";var n=e(4);r.exports=class{constructor(r){var t=r.trim().split(/\s+/g);this.inp=new n(t)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(r,t,e){"use strict";r.exports=class{constructor(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=r.length,this.items=r,this.ind=0}enq(r){this.size+=1,this.items.push(r)}deq(){var r=this.items[this.ind];return this.size-=1,this.ind+=1,r}clear(){this.items=[],this.size=0,this.ind=0}}},function(r,t,e){"use strict";r.exports=function(r){for(var t=r.in(),e=r.in(),n=(r.in(),new Array(t)),i=0;i<t;i++)n[i]=r.inr().split("");for(var o=0,s=new Array(t).fill(1),u=0;u<t;u++){for(var f=!1,a=0;a<e;a++)"."==n[u][a]?f&&(n[u][a]=o):(f=!0,o+=1,n[u][a]=o);f||(s[u]=0)}for(var c=t-1;c>=0;c--)for(var l=!1,p=e-1;p>=0;p--)"."==n[c][p]?l&&(n[c][p]=o):(l=!0,o=n[c][p]);for(var d=1;d<t;d++)if(1!=s[d]&&0!=s[d-1]){for(var v=0;v<e;v++)n[d][v]=n[d-1][v];s[d]=1}for(var h=t-2;h>=0;h--)if(1!=s[h]&&0!=s[h+1]){for(var y=0;y<e;y++)n[h][y]=n[h+1][y];s[h]=1}for(var b=0;b<t;b++)console.log(n[b].join(" "))}}]);