#UnknownID14. JIXMPII5JUhKSP0#;$+

JIXMPII5JUhKSP0#;$+

Statement

Alex thinks some array is good if there exists some element that can be represented as the sum of all other elements (the sum of all other elements is 0 0 if there are no other elements). For example, the array [1,6,3,2] [1,6,3,2] is good since 1+3+2=6 1+3+2=6 . Furthermore, the array [0] [0] is also good. However, the arrays [1,2,3,4] [1,2,3,4] and [1] [1] are not good.

Alex has an array a1,a2,,an a_1,a_2,\ldots,a_n . Help him count the number of good non-empty prefixes of the array a a . In other words, count the number of integers i i ( 1in 1 \le i \le n ) such that the length i i prefix (i.e. a1,a2,,ai a_1,a_2,\ldots,a_i ) is good.

Format

Input

The first line of the input contains a single integer t t ( 1t104 1 \leq t \leq 10^4 ) — the number of test cases.

The first line of each test case contains a single integer n n ( 1n2105 1 \le n \le 2 \cdot 10^5 ) — the number of elements in the array.

The second line of each test case contains n n integers a1,a2,,an a_1,a_2,\ldots,a_n ( 0ai109 0 \le a_i \le 10^9 ) — the elements of the array.

It is guaranteed that the sum of n n over all test cases does not exceed 2105 2 \cdot 10^5 .

Output

For each test case, output a single integer — the number of good non-empty prefixes of the array a a .

Sample

7
1
0
1
1
4
1 1 2 0
5
0 1 2 1 4
7
1 1 0 3 5 2 12
7
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 294967296
10
0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 589934592
1
0
3
3
4
1
2