A ledger has n entries in order; each entry is an integer that may be positive (a credit) or negative (a debit). Find the shortest contiguous span of entries whose net total is at least the target S, and report its length. If no span reaches S, report 0.
Input format
Line 1: two integers n and S.
Line 2: n space-separated integers, the ledger entries in order (may be negative).
Output format
A single integer: the length of the shortest contiguous span with sum at least S, or 0 if none exists.
Constraints
- 1 ≤ n ≤ 100000
- -1000000000 ≤ each entry ≤ 1000000000
- 1 ≤ S ≤ 1000000000000