#include <bits/stdc++.h>
using namespace std;
template <class T>
void swap(T &xp, T &yp) {
  T temp = xp;
  xp = yp;
  yp = temp;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int nCr(long long int n, long long int k) {
  long long int res = 1;
  if (k > (n - k)) k = n - k;
  for (long long int i = 0; i < k; i++) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long int pwr(long long int a, long long int b) {
  long long int result = 1;
  while (b > 0) {
    if (b & 1) result = result * a;
    a = a * a;
    b >>= 1;
  }
  return result;
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int extended_gcd(long long int a, long long int b, long long int &x,
                           long long int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long int x1, y1;
  long long int d = extended_gcd(b, a % b, x1, y1);
  x = y1;
  y = (x1 - y1 * (a / b));
  return d;
}
void sieve(bool *primes, long long int n, vector<long long int> *s) {
  for (long long int i = 0; i <= n; i++) {
    primes[i] = true;
  }
  primes[0] = primes[1] = false;
  for (long long int i = 2; i * i <= n; i++) {
    if (primes[i] == true) {
      for (long long int p = i * i; p <= n; p += i) {
        primes[p] = false;
      }
    }
  }
  for (long long int i = 0; i <= n; i++) {
    if (primes[i]) {
      s->push_back(i);
    }
  }
}
bool is_Prime(long long int n) {
  if (n == 2 && n == 3) {
    return true;
  }
  if ((n == 1) || (n % 2 == 0) || (n % 3 == 0)) {
    return false;
  }
  for (long long int i = 5; i * i <= n; i += 6) {
    if ((n % i == 0) || (n % (i + 2) == 0)) return false;
  }
  return true;
}
vector<bool> segmentedSieve(long long L, long long R) {
  long long lim = sqrt(R);
  vector<bool> mark(lim + 1, false);
  vector<long long> primes;
  for (long long i = 2; i <= lim; ++i) {
    if (!mark[i]) {
      primes.emplace_back(i);
      for (long long j = i * i; j <= lim; j += i) mark[j] = true;
    }
  }
  vector<bool> isPrime(R - L + 1, true);
  for (long long i : primes)
    for (long long j = max(i * i, (L + i - 1) / i * i); j <= R; j += i)
      isPrime[j - L] = false;
  if (L == 1) isPrime[0] = false;
  return isPrime;
}
long long int bintonum(string s) {
  long long int i = 0, res = 0;
  for (long long int j = s.size() - 1; j >= 0; j--) {
    res += (pwr(2, i) * (long long int)(s[j]));
    i++;
  }
  return res;
}
long long int mod_add(long long int a, long long int b, long long int m) {
  a = a % m;
  b = b % m;
  return (((a + b) % m) + m) % m;
}
long long int mod_mul(long long int a, long long int b, long long int m) {
  a = a % m;
  b = b % m;
  return (((a * b) % m) + m) % m;
}
long long int mod_sub(long long int a, long long int b, long long int m) {
  a = a % m;
  b = b % m;
  return (((a - b) % m) + m) % m;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int nCrModPFermat(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  long long int fac[n + 1];
  fac[0] = 1;
  for (long long int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
void solve() {
  long long int s, i, exp;
  cin >> s >> i >> exp;
  ;
  long long int l = 0, r = exp;
  long long int ans = -1;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    if (s + mid > i + exp - mid) {
      ans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  if (ans == -1) {
    cout << 0 << "\n";
    return;
  }
  cout << exp - ans + 1 << endl;
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  cin >> t;
  for (long long int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
