#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int cas = 0; cas < t; cas++) {
    int n;
    cin >> n;
    vector<int> numbers(n);
    int sum = 0;
    int zer = 0;
    int ans;
    for (int i = 0; i < n; i++) {
      cin >> numbers[i];
      sum = sum + numbers[i];
      if (numbers[i] == 0) zer++;
    }
    if (sum > 0) {
      ans = zer;
    } else if (sum < 0) {
      if (sum == -zer) {
        ans = zer + 1;
      } else {
        ans = zer;
      }
    } else {
      if (zer == 0) {
        ans = 1;
      } else {
        ans = zer;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
