AtCoder Beginner Contest 124
A
Buttons
AtCoder
⌀ 0
原题
←B →
翻译中…

Problem Statement

翻译中…

There are two buttons, one of size $A$ and one of size $B$.

翻译中…

When you press a button of size $X$, you get $X$ coins and the size of that button decreases by $1$.

翻译中…

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.
  • $3 \leq A, B \leq 20$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

A B

翻译中…

Output

翻译中…

Print the maximum number of coins you can get.

翻译中…

样例

Input #1
5 3
Output #1
9
You can get $5 + 4 = 9$ coins by pressing the button of size $5$ twice, and this is the maximum result.
Input #2
3 4
Output #2
7
Input #3
6 6
Output #3
12
题目信息
题号
abc124_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。