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