#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> nums;
    for (long long i = 0; i < n; i++) {
      int num;
      cin >> num;
      nums.push_back(num);
    }
    sort(nums.begin(), nums.end());
    long long c = 0;
    for (int i = 0; i < n; i++) {
      if (nums[i] == 0) {
        nums[i] += 1;
        c++;
      }
    }
    long long sum = 0;
    for (int i = 0; i < n; i++) {
      sum += nums[i];
    }
    if (sum == 0) {
      c++;
    }
    cout << c << endl;
  }
}
