Score : $200$ points
Takahashi has $A$ untasty cookies containing antidotes, $B$ tasty cookies containing antidotes and $C$ 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.
Input is given from Standard Input in the following format:
$A$ $B$ $C$
Print the maximum number of tasty cookies that Takahashi can eat.
3 1 4
5
We can eat all tasty cookies, in the following order:
5 2 9
10
8 8 1
9