#abc124a. [abc124_a]Buttons
[abc124_a]Buttons
Problem Statement
There are two buttons, one of size and one of size .
When you press a button of size , you get coins and the size of that button decreases by .
You will press a button twice. Here, you can press the same button twice, or press both buttons once.
At most how many coins can you get?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum number of coins you can get.
Sample Input 1
5 3
Sample Output 1
9
You can get coins by pressing the button of size twice, and this is the maximum result.
Sample Input 2
3 4
Sample Output 2
7
Sample Input 3
6 6
Sample Output 3
12