A fundraiser logs n donation entries in order; each entry is an integer amount (a negative amount represents a reversed or refunded donation). Given a target t, count how many contiguous runs of consecutive entries have amounts summing to exactly t. Two runs are different if they start or end at different positions, even if their amounts are identical.
Input format
Line 1: an integer n.
Line 2: n space-separated integers, the donation amounts in order.
Line 3: an integer t, the target sum.
Output format
A single integer: the number of contiguous runs whose sum equals t.
Constraints
- 1 <= n <= 100000
- -1000000 <= each amount <= 1000000
- -1000000000 <= t <= 1000000000