#include <bits/stdc++.h>
using namespace std;
long double q, a, b, c, ans;
int main() {
  cin >> q;
  for (int i = 1; i <= q; i++) {
    cin >> a >> b >> c;
    a = a / 2;
    b = b / 2;
    c = c / 2;
    ans = a + b + c;
    cout << (long long)ans << "\n";
  }
  return 0;
}
