#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int te;
  cin >> te;
  for (int w = 0; w < te; w++) {
    int n;
    cin >> n;
    int sum = 0, zc = 0, mc = 0;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      if (x == 0)
        zc += 1;
      else if (x == -1)
        mc += 1;
      sum += x;
    }
    sum += zc;
    if (sum != 0)
      cout << zc << endl;
    else {
      cout << zc + 1 << endl;
    }
  }
}
