QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 64 MB

#23573. Three Dice

Statistics

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

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.