There is a game in which you roll 3 dice with faces numbered from 1 to 6 and receive prize money according to the following rules.
Rule (1): If all 3 dice show the same number, you receive $10,000 + (\text{the repeated number}) \times 1,000$ won.
Rule (2): If exactly 2 dice show the same number, you receive $1,000 + (\text{the repeated number}) \times 100$ won.
Rule (3): If all the numbers are different, you receive $(\text{the largest number}) \times 100$ won.
For example, if the 3 numbers are 3, 3, 6, the prize is calculated as $1,000 + 3 \times 100$, so you receive 1,300 won.
If the 3 numbers are 2, 2, 2, it is calculated as $10,000 + 2 \times 1,000$, so you receive 12,000 won.
If the 3 numbers are 6, 2, 5, the largest is 6, so it is calculated as $6 \times 100$, and you receive 600 won.
Write a program that calculates the prize money given the numbers shown on the 3 dice.
Input
The first line contains the 3 numbers, separated by spaces.
Output
Print the prize money for the game on the first line.
Examples
Input 1
3 3 6
Output 1
1300
Input 2
2 2 2
Output 2
12000
Input 3
6 2 5
Output 3
600