function main(input) {
    const args = input.split(' ');
    var A = parseInt(args[0], 10);
    var B = parseInt(args[1], 10);
    var C = parseInt(args[2], 10);

    var ans = 0;

    if ( C - (A + 1) >= 0) {
        ans += A + 1;
        C = C - (A + 1);
    } else {
        ans += C;
        C = 0;
    }

    if( C > B) {
        ans += B * 2;
    } else {
        ans += B + C;
    }
    console.log(ans);

}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
