Given n ledger entries, count the number of ways to split the sequence into a non-empty prefix (the first i entries, for some 1 <= i <= n-1) and the remaining non-empty suffix (the last n-i entries), such that the sum of the prefix equals the sum of the suffix. Print the total count of such split positions i.
If n < 2 there is no valid split, so the answer is 0.
Input format
Line 1: an integer n.
Line 2: n space-separated integers (present only if n >= 1).
Output format
A single integer: the number of split positions with equal prefix and suffix sums.
Constraints
- 1 <= n <= 100000
- -1000 <= entry <= 1000