#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int i, j, n, k, l, s = 0, m = 0, p = 0, r = 0;
    cin >> n;
    int a[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
      s += a[i];
      if (a[i] == 0) p++;
      if (a[i] < -1) r++;
      if (a[i] > 0) m++;
    }
    s += p;
    if (s != 0)
      cout << p << endl;
    else {
      cout << p + 1 << endl;
    }
  }
  return 0;
}
