#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int a[maxn];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int sum = 0;
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      sum += a[i];
      if (a[i] == 0) {
        cnt++;
      }
    }
    sum += cnt;
    if (sum == 0) {
      printf("%d\n", cnt + 1);
    } else {
      printf("%d\n", cnt);
    }
  }
  return 0;
}
