A conveyor carries n crates in a row, each with a nonnegative integer weight. A crate is heavy if its weight is odd. Count how many contiguous subarrays contain exactly k heavy crates. Distinct index ranges are counted separately.
Input format
Line 1: two integers n and k.
Line 2: n space-separated integers, the crate weights.
Output format
A single integer: the number of contiguous subarrays containing exactly k odd-weight crates.
Constraints
- 1 <= n <= 40
- 0 <= k <= 40
- 0 <= each weight <= 1000000