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