#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1LL << 62;
const long long mx = 100005;
const double eps = 1e-10;
long long dx[10] = {1, 0, -1, 0};
long long dy[10] = {0, -1, 0, 1};
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long x = power(a, b / 2);
  x = x * x;
  if (b % 2) x = x * a;
  return x;
}
long long Set(long long N, long long pos) { return N = N | (1LL << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1LL << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1LL << pos)); }
long long arr[109];
int main() {
  long long tst, a, b, c, k, n, m, res = 0, ans = 0, t = 0;
  scanf("%lld", &tst);
  while (tst--) {
    scanf("%lld", &n);
    res = 0;
    ans = 0;
    for (long long i = 1; i <= n; i++) {
      scanf("%lld", &arr[i]);
      if (arr[i] == 0) {
        arr[i]++;
        ans++;
      }
      res += arr[i];
    }
    if (res == 0) ans++;
    cout << ans << "\n";
  }
  return 0;
}
