function Main(input){
	var N = parseInt(input.trim().split(" ")[0]);
  	var A = parseInt(input.trim().split(" ")[1]);
  	var B = parseInt(input.trim().split(" ")[2]);
  	A===0?console.log(0):console.log(A + (N-(A+B)));
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));