#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int str, mnd, exp, ans, zero = 0;
  cin >> str >> mnd >> exp;
  ans = max(zero, (mnd + exp - str + 2) / 2);
  cout << max(zero, exp - ans + 1) << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
