function myout(text){console.log(text);}//standard output
function Main(input) {
	input = input.trim();
	//input = parseInt(input.trim());
	//input = input.trim().split(" ");
	//input = input.trim().split("\n");
	input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  //var output = 0;
  if(input[0] + input[1] >= input[2]){
     myout(input[1] + input[2]);
  }else{
    myout(input[0] + input[1] + 1);
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
