Guy-Manuel and Thomas have an array $a$ of $n$ integers [$a_1, a_2, \dots, a_n$]. In one step they can add $1$ to any element of the array. Formally, in one step they can choose any integer index $i$ ($1 \le i \le n$) and do $a_i := a_i + 1$.

If either the sum or the product of all elements in the array is equal to zero, Guy-Manuel and Thomas do not mind to do this operation one more time.

What is the minimum number of steps they need to do to make both the sum and the product of all elements in the array different from zero? Formally, find the minimum number of steps to make $a_1 + a_2 +$ $\dots$ $+ a_n \ne 0$ and $a_1 \cdot a_2 \cdot$ $\dots$ $\cdot a_n \ne 0$.


-----Input-----

Each test contains multiple test cases. 

The first line contains the number of test cases $t$ ($1 \le t \le 10^3$). The description of the test cases follows.

The first line of each test case contains an integer $n$ ($1 \le n \le 100$) — the size of the array.

The second line of each test case contains $n$ integers $a_1, a_2, \dots, a_n$ ($-100 \le a_i \le 100$) — elements of the array .


-----Output-----

For each test case, output the minimum number of steps required to make both sum and product of all elements in the array different from zero.


-----Example-----
Input
4
3
2 -1 -1
4
-1 0 0 1
2
-1 2
3
0 -2 1

Output
1
2
0
2



-----Note-----

In the first test case, the sum is $0$. If we add $1$ to the first element, the array will be $[3,-1,-1]$, the sum will be equal to $1$ and the product will be equal to $3$.

In the second test case, both product and sum are $0$. If we add $1$ to the second and the third element, the array will be $[-1,1,1,1]$, the sum will be equal to $2$ and the product will be equal to $-1$. It can be shown that fewer steps can't be enough.

In the third test case, both sum and product are non-zero, we don't need to do anything.

In the fourth test case, after adding $1$ twice to the first element the array will be $[2,-2,1]$, the sum will be $1$ and the product will be $-4$.

Difficulty: interview

Starter code:

Solutions:
import sys
import math
import heapq
import bisect
import re
from collections import deque
from decimal import *
from fractions import gcd
 
def YES_NO(flag):
    if flag:
        print("AWW")
    else:
        print("WAW")
 
 
def main():
    # q = [int(i) for i in sys.stdin.readline().split()]
    n = int(sys.stdin.readline())
    q = [int(i) for i in sys.stdin.readline().split()]
    w = q.count(0)
    if w + sum(q) == 0:
        print(w + 1)
    else:
        print(w)
for i in range(int(sys.stdin.readline())):
    main()

t = int(input())
for zz in range(t):
    n = int(input())
    a = [int(i) for i in input().split()]
    ans = a.count(0)
    if sum(a) + a.count(0) == 0:
        ans += 1
    print(ans)


for _ in range(int(input())):
    n = int(input())
    ar = list(map(int, input().split()))
    x = sum(ar)
    y = ar.count(0)
    if x + y == 0:
        print(y + 1)
    else:
        print(y)

def solve():
    n = int(input())
    arr = list(map(int, input().split()))
    cnt = 0
    for i in range(n):
        if not arr[i]:
            arr[i] += 1
            cnt += 1
    if not sum(arr):
        cnt += 1
    return cnt


for _ in range(int(input())):
    print(solve())


for nt in range(int(input())):
	n=int(input())
	l=list(map(int,input().split()))
	count=0
	for i in range(n):
		if l[i]==0:
			count+=1
			l[i]=1
	if sum(l)==0:
		count+=1
	print (count)

N = int(input())
for _ in range(N):
    n = int(input())
    lst = list(map(int, input().split()))
    ans = 0
    for i in range(len(lst)):
        if lst[i] == 0:
            ans += 1
            lst[i] += 1

    if sum(lst) == 0:
        ans += 1
    print(ans)


t = int(input())
while(t):
    t -= 1
    n = int(input())
    a = list(map(int, input().split()))
    ans = a.count(0)
    summ = sum(a) + ans
    if(summ == 0):
        print(ans+1)
    else:
        print(ans)

for _ in range(int(input())):
    n = int(input())
    a = list(map(int, input().split()))

    c = 0

    for i in range(n):
        if a[i] == 0:
            a[i] += 1
            c += 1

    if sum(a) == 0:
        c += 1

    print(c)

t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(j) for j in input().split()]
	z = arr.count(0)

	su = sum(arr) + z

	if su == 0:
		z += 1
	print(z)

t = int(input())
for i in range(t):
    n = int(input())
    arr = 0
    a = [int(x) for x in input().split()]
    s = sum(a)
    for item in a:
        if item == 0:
            arr += 1
            s += 1
    if (s == 0):
        print(arr + 1)
    else:
        print(arr)


t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    ans = 0
    for i in range(n):
        if a[i] == 0:
            a[i] += 1
            ans += 1
    if sum(a) == 0:
        ans += 1
    print(ans)

import sys
t=int(input())
for _ in range(t):
	n=int(input())
	l = list(map(int,sys.stdin.readline().split()))
	ans = 0
	for i in range(n):
		if l[i]==0:
			ans+=1
			l[i]=1
	if sum(l)==0:
		ans+=1
	print(ans)


import sys
import math
from collections import defaultdict
from collections import deque
from itertools import combinations
from itertools import permutations
input = lambda : sys.stdin.readline().rstrip()
read = lambda : list(map(int, input().split()))
go = lambda : 1/0
def write(*args, sep="\n"):
  for i in args:
    sys.stdout.write("{}{}".format(i, sep))
INF = float('inf')
MOD = int(1e9 + 7)
YES = "YES"
NO = "NO"

for _ in range(int(input())):
  try:
    n = int(input())
    arr = read()
    ans = 0

    for i in range(n):
      if arr[i] == 0:
        arr[i] = 1
        ans += 1
    
    if sum(arr) == 0:
      print(ans + 1)
    else:
      print(ans)

  except ZeroDivisionError:
    continue 

  except Exception as e:
    print(e)
    continue

for _ in range(int(input())):
	n=int(input())
	l=list(map(int,input().split()))
	ans=0
	for i in range(n):
		if l[i]==0:
			l[i]=1
			ans+=1
	if sum(l)==0:
		ans+=1
	print(ans)


for _ in range(int(input())):
    n = int(input())
    a = list(map(int, input().split()))
    ans = 0
    c = a.count(0)
    summ = sum(a)
    if c > 0:
        ans += c
        summ += c
    if summ == 0:
        ans += 1
    print(ans)

import sys

# inf = open('input.txt', 'r')
# reader = (line.rstrip() for line in inf)
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__

t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    ctr = 0
    sm = sum(a)
    for val in a:
        if val == 0:
            ctr += 1
    if sm + ctr == 0:
        ctr += 1
    print(ctr)

# inf.close()


def main():
    import sys
    input = sys.stdin.readline

    t = int(input())
    for _ in range(t):
        N = int(input())
        A = list(map(int, input().split()))

        s = 0
        ans = 0
        for a in A:
            if a == 0:
                ans += 1
                s += 1
            else:
                s += a
        if s == 0:
            ans += 1
        print(ans)


def __starting_point():
    main()

__starting_point()

for t in range(int(input())):
    n = int(input())
    l = [int(i) for i in input().split()]
    zero = 0
    ssum = 0
    for i in l:
        ssum += i
        if (not i):
            zero += 1
    res = zero
    if (ssum + zero == 0):
        res += 1
    print(res)

for _ in range(int(input())):
	n=int(input())
	l=list(map(int,input().split()))
	s=sum(l)
	z=l.count(0)
	count=z
	s+=z
	if s==0:
		count+=1
	print(count)

#Bhargey Mehta (Junior)
#DA-IICT, Gandhinagar
import sys, math
MOD = 998244353
#sys.stdin = open('input.txt', 'r')

for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	z = a.count(0)
	s = sum(a)
	ans = z + (s+z == 0)
	print(ans)

t = int(input())
for k in range(t):
	n = int(input())
	mas = list(map(int, input().split()))
	kol = 0
	for i in range(n):
		if mas[i] == 0:
			mas[i] = 1
			kol += 1
	print(kol + int(sum(mas) == 0))


for _ in range(int(input())):
    n = int(input())
    L = list(map(int,input().split()))
    ans = 0
    for i in range(len(L)):
        if L[i] == 0:
            ans += 1
            L[i] = 1
    
    if sum(L) == 0:
        ans += 1

    print(ans)

for _ in range(int(input())):
    n = int(input())
    l1 = list(map(int, input().split()))
    moves = 0
    x = 0
    for i in range(n):
        if l1[i] == 0:
            l1[i] = 1
            moves+=1
        x = x + l1[i]
    if x!=0:
        print(moves)
    else:
        print(moves+1)


def main():
    t = int(input())
    for _ in range(t):
        n = int(input())
        array = [int(x) for x in input().strip().split()]
        zeros = 0
        sum_ = sum(array)
        for x in array:
            if x == 0:
                zeros += 1
        if (zeros + sum_) == 0:
            zeros += 1
        print(zeros)


def __starting_point():
    main()

__starting_point()

t = int(input())
for i in range(t):
    n = int(input())
    a = list(map(int,input().split()))

    ans = 0
    for i in range(n):
        if a[i] == 0:
            a[i] += 1
            ans += 1
    
    if sum(a) == 0:
        ans += 1
    
    print(ans)