#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, n, a;
  cin >> t;
  while (t--) {
    int byknol = 0, tot = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      cin >> a;
      if (a == 0) byknol++;
      tot += a;
    }
    if (tot + byknol == 0) byknol++;
    cout << byknol << '\n';
  }
  return 0;
}
