#include <bits/stdc++.h>
const int N = 100010, INF = 0x3f3f3f3f;
int T;
int a[N];
int n;
inline int read(void) {
  int res, f = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f = -1;
  res = c - 48;
  while ((c = getchar()) >= '0' && c <= '9') res = res * 10 + c - 48;
  return res * f;
}
int main(void) {
  T = read();
  while (T--) {
    n = read();
    int sum = 0;
    for (register int i = 1; i <= n; ++i) {
      a[i] = read();
      sum += a[i];
    }
    int cnt = 0;
    for (register int i = 1; i <= n; ++i) {
      if (a[i] == 0) {
        ++sum;
        ++cnt;
      }
    }
    if (!sum) {
      ++cnt;
    }
    printf("%d\n", cnt);
  }
  return 0;
}
