#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double epsilon = 1e-9;
const int maxn = 1e6 + 10;
void solve() {
  long long int str, inte, exp;
  cin >> str >> inte >> exp;
  cout << max(exp - (max(0LL, exp + inte - str + 2) / 2) + 1, 0LL) << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
