#include <bits/stdc++.h>
using namespace std;
int binary_search(int str, int inte, int exp) {
  int mid, l = 0, r = exp, ans = exp + 1;
  while (l <= r) {
    mid = (l + r) / 2;
    if ((str + mid) > (inte + (exp - mid))) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  return ans;
}
int main() {
  ofstream out("output.txt");
  int t, second, i, e;
  cin >> t;
  for (int k = 0; k < t; k++) {
    cin >> second >> i >> e;
    int j = binary_search(second, i, e);
    cout << e - j + 1 << "\n";
  }
  return 0;
}
