
function Main(args){

  const input = args.split(" ");

  const a_max = Number(input[0]);
  const a_current = Number(input[1]);
  const b_current = Number(input[2]);
  const a_capacity = a_max - a_current;
  console.log( Math.max(b_current - a_capacity, 0) );

}

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