function main(input) {
    "use strict";
    let args = input.split(" ").map(value => +value);
    const a = args[0];
    const b = args[1];
    const c = args[2];

    const noPoisons = a + b;

    const maxC = noPoisons > c - 1 ? c : noPoisons + 1;

    console.log(maxC + b);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));