#agc030a. [agc030_a]Poisonous Cookies

[agc030_a]Poisonous Cookies

Problem Statement

Takahashi has AA untasty cookies containing antidotes, BB tasty cookies containing antidotes and CC tasty cookies containing poison.

Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in such a situation. Eating a cookie containing antidotes while having a stomachache cures it, and there is no other way to cure stomachaches.

Find the maximum number of tasty cookies that Takahashi can eat.

Constraints

  • 0leqA,B,Cleq1090 \\leq A,B,C \\leq 10^9
  • A,BA,B and CC are integers.

Input

Input is given from Standard Input in the following format:

AA BB CC

Output

Print the maximum number of tasty cookies that Takahashi can eat.


Sample Input 1

3 1 4

Sample Output 1

5

We can eat all tasty cookies, in the following order:

  • A tasty cookie containing poison
  • An untasty cookie containing antidotes
  • A tasty cookie containing poison
  • A tasty cookie containing antidotes
  • A tasty cookie containing poison
  • An untasty cookie containing antidotes
  • A tasty cookie containing poison

Sample Input 2

5 2 9

Sample Output 2

10

Sample Input 3

8 8 1

Sample Output 3

9