#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  scanf("%d", &(test));
  for (int t = 1; t <= test; t++) {
    int n;
    scanf("%d", &(n));
    int a[200], cnt = 0;
    int sum = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &(a[i]));
      if (a[i] == 0) {
        a[i] = 1;
        cnt++;
      }
      sum = sum + a[i];
    }
    if (sum != 0)
      cout << cnt << endl;
    else {
      cout << cnt + 1 << endl;
    }
  }
  return 0;
}
