#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    ;
    long long int sum = 0, temp = 0, ans = 0;
    for (long long int i = 0; i < n; i++)
      if (a[i] == 0) temp++;
    for (long long int i = 0; i < n; i++) sum += a[i];
    ans = temp;
    sum += temp;
    if (sum == 0) ans++;
    cout << ans << endl;
  }
  return 0;
}
