{"raw_statement":[{"iden":"problem statement","content":"Takahashi has $A$ untasty cookies containing antidotes, $B$ tasty cookies containing antidotes and $C$ tasty cookies containing poison.\nEating 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.\nFind the maximum number of tasty cookies that Takahashi can eat."},{"iden":"constraints","content":"*   $0 \\leq A,B,C \\leq 10^9$\n*   $A,B$ and $C$ are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$ $B$ $C$"},{"iden":"sample input 1","content":"3 1 4"},{"iden":"sample output 1","content":"5\n\nWe can eat all tasty cookies, in the following order:\n\n*   A tasty cookie containing poison\n*   An untasty cookie containing antidotes\n*   A tasty cookie containing poison\n*   A tasty cookie containing antidotes\n*   A tasty cookie containing poison\n*   An untasty cookie containing antidotes\n*   A tasty cookie containing poison"},{"iden":"sample input 2","content":"5 2 9"},{"iden":"sample output 2","content":"10"},{"iden":"sample input 3","content":"8 8 1"},{"iden":"sample output 3","content":"9"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}