#C1350. Even Sum Odd Count Product

    ID: 43045 Type: Default 1000ms 256MiB

Even Sum Odd Count Product

Even Sum Odd Count Product

You are given a list of integers. Your task is to compute the product of the sum of all even numbers in the list and the count of odd numbers in the list.

The formulation of the problem can be expressed in LaTeX as follows:

\[ \text{result} = \left( \sum_{x \in S,\, x \bmod 2 = 0} x \right) \times \left( \#\{ x \in S : x \bmod 2 \neq 0 \} \right) \]

If the list contains no even numbers or no odd numbers, then the result will be zero.

The input is provided via standard input and the output should be printed to standard output.

inputFormat

The first line contains a single integer n which represents the number of elements in the list. The second line contains n space-separated integers.

Example:

5
2 3 4 5 6

outputFormat

Output a single integer which is the product of the sum of even numbers and the count of odd numbers.

Example:

24
## sample
5
2 3 4 5 6
24