#K89002. Artifact Power

    ID: 37433 Type: Default 1000ms 256MiB

Artifact Power

Artifact Power

This problem requires you to compute the Artifact Power of an array of integers. The Artifact Power is defined as the product of the maximum value in the array and the sum of all even numbers in the array. Formally, if the array is A with size n, let \(M = \max\{A\}\) and \(S = \sum_{a_i \text{ is even}} a_i\). The answer is \(M \times S\). If the array is empty, then the result is 0.

Your program should read input from standard input and write the result to standard output.

inputFormat

The first line of input contains an integer n which represents the number of elements in the array. The second line contains n integers separated by spaces. If n is 0, the array is considered empty.

outputFormat

Output a single integer: the Artifact Power.

## sample
4
5 15 10 7
150