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