#abc096b. [abc096_b]Maximum Sum
[abc096_b]Maximum Sum
Problem Statement
There are three positive integers , and written on a blackboard. E869120 performs the following operation times:
- Choose one integer written on the blackboard and let the chosen integer be . Replace the chosen integer with .
What is the largest possible sum of the integers written on the blackboard after operations?
Constraints
- and are integers between and (inclusive).
- is an integer between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
Print the largest possible sum of the integers written on the blackboard after operations by E869220.
Sample Input 1
5 3 11
1
Sample Output 1
30
In this sample, are initially written on the blackboard, and E869120 can perform the operation once.
There are three choices:
- Double : The integers written on the board after the operation are .
- Double : The integers written on the board after the operation are .
- Double : The integers written on the board after the operation are .
If he chooses 3., the sum of the integers written on the board afterwards is , which is the largest among 1. through 3.
Sample Input 2
3 3 4
2
Sample Output 2
22
E869120 can perform the operation twice. The sum of the integers eventually written on the blackboard is maximized as follows:
- First, double . The integers written on the board are now .
- Next, double . The integers written on the board are now .
Then, the sum of the integers eventually written on the blackboard is .