题目描述
Problem Description
Competitions were held in two divisions: "Code Division" and "Device Implementation Division".
In each competition, the 3rd place finisher receives a prize of $100,000, the 2nd place finisher receives $200,000, and the 1st place finisher receives $300,000. Additionally, a contestant who ranks 1st in both the Code Division and the Device Implementation Division receives an additional prize of $400,000.
DISCO-kun ranked Xth in the Code Division and Yth in the Device Implementation Division.
Calculate the total prize money he can receive.
Input Format
The input is given from the standard input in the following format:
$ X $ $ Y $
Output Format
Output the total prize money DISCO-kun can receive as an integer.
Sample Input and Output
Sample Input #1
1 1
Sample Output #1
1000000
Sample Input #2
3 101
Sample Output #2
100000
Sample Input #3
4 4
Sample Output #3
0
Notes/Hints
Constraints
- $1 \leq X \leq 205$
- $1 \leq Y \leq 205$
- $ X, Y $ are integers.
Sample Explanation 1
In this case, DISCO-kun receives $300,000 for ranking 1st in the Code Division and $300,000 for ranking 1st in the Device Implementation Division. Additionally, since he ranked 1st in both competitions, he receives an additional $400,000. The total is $300,000 + $300,000 + $400,000 = $1,000,000.
Sample Explanation 2
In this case, DISCO-kun receives $100,000 for ranking 3rd in the Code Division.
Sample Explanation 3
Unfortunately, in this case, DISCO-kun did not receive any prize money in either competition.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分