Question
Dual Threshold Window

Find the minimum length of a contiguous subarray whose sum is at least S and which contains at least q odd values. All array values are positive.

Input

First line: KaTeX can only parse string typed expression.
Second line: the array.

Output

Print the minimum valid length, or KaTeX can only parse string typed expression.

Example
Input:
7 15 2

2 4 5 6 3 8 1
Output:
4
Explanation:
[5,6,3,8] has sum 22 and two odd values; no shorter window satisfies both conditions.

Online