#include <bits/stdc++.h>
void Open() {
  freopen(
      "txt"
      ".in",
      "r", stdin);
  freopen(
      "txt"
      ".out",
      "w", stdout);
}
void Close() {
  fclose(stdin);
  fclose(stdout);
}
using namespace std;
int Read() {
  int val = 0, opt = 1;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') opt = -1;
  while (isdigit(ch)) (val *= 10) += ch - '0', ch = getchar();
  return val * opt;
}
int a[200], Ans, Sum, b;
void work() {
  int n = Read();
  Ans = 0;
  Sum = 0;
  for (int i = 1; i <= n; i++) {
    a[i] = Read();
    Sum += a[i];
    if (!a[i]) {
      Ans++;
      a[i]++;
      Sum++;
    }
  }
  if (!Sum) {
    b = 1;
    for (int i = 1; i <= n; i++)
      if (a[i] > 0 || a[i] < -1) {
        Ans++;
        b = 0;
        break;
      }
    if (b) Ans += 2;
  }
  printf("%d\n", Ans);
}
int main(void) {
  for (int T = Read(); T; T--) work();
  return 0;
}
