#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e9 + 7;
const double pi = 2 * acos(0.0);
const int N = 3e5 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, t;
  cin >> t;
  while (t--) {
    cin >> n;
    int x, z = 0, tot = 0;
    for (int i = 0; i < n; i++) {
      cin >> x;
      if (!x) z++;
      tot += x;
    }
    cout << z + ((tot + z) == 0) << endl;
  }
  return 0;
}
