function main(input) {
  const lines = input.split('\n');
  lines.pop();
  lines.forEach(line => {
    const parsed = line.split(' ');
    console.log(fn(
      parseInt(parsed[0], 10),
      parseInt(parsed[1], 10),
      parseInt(parsed[2], 10)
    ));
  });
}

function fn(a, b, c) {
  const answer = c - a + b;
  if (answer < 0) {
    return 0;
  }
  return answer;
}

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