#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n, g[105], sum = 0, s = 0;
    cin >> n;
    for (register int i = 0; i < n; i++)
      cin >> g[i], g[i] == 0 ? sum++, g[i]++ : 0, s += g[i];
    if (s == 0) sum++;
    cout << sum << endl;
  }
  return 0;
}
