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