#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, tc = 0;
  scanf("%d", &T);
  while (T--) {
    int sum = 0, zero = 0;
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; ++i) {
      cin >> arr[i];
      sum += arr[i];
      if (arr[i] == 0) zero++;
    }
    sum += zero;
    if (sum == 0)
      cout << zero + 1 << endl;
    else
      cout << zero << endl;
  }
  return 0;
}
