Given an integer sequence

of length

, and two non-negative integers

and

, you need to select a subsequence

(where

is the length of the subsequence) that satisfies the following conditions:
-
When
is odd and
,
;
-
When
is a positive even number,
.
Determine the maximum possible length of such a subsequence.
A subsequence of

is an array formed by deleting some elements from

. This includes deleting zero elements (keeping the entire array) or deleting all elements.
输入描述:
The first line contains three integers
,
, and
(
,
), representing the length of the sequence, the constraint
for the first condition, and the constraint
for the second condition.
The second line contains
integers
(
), the given integer sequence.
输出描述:
Output a single integer on a line, representing the maximum length of a valid subsequence.