#include <bits/stdc++.h>
using namespace std;
int t, n, a[233];
int main() {
  scanf("%d", &t);
  while (t--) {
    int sum = 0, flg = 0;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
      scanf("%d", &a[i]), sum += a[i], flg += a[i] == 0;
    printf("%d\n", flg == 0 && sum == 0 ? 1 : flg + (flg == -sum));
  }
}
