#abc272c. [abc272_c]Max Even

[abc272_c]Max Even

Problem Statement

You are given a sequence A=(A1,A2,ldots,AN)A=(A_1,A_2,\\ldots,A_N) of length NN consisting of non-negative integers.

Determine if there is an even number represented as the sum of two different elements of AA. If it exists, find the maximum such number.

Constraints

  • 2leqNleq2times1052\\leq N \\leq 2\\times 10^5
  • 0leqAileq1090\\leq A_i\\leq 10^9
  • The elements of AA are distinct.
  • All values in the input are integers.

Input

The input is given from Standard Input in the following format:

NN A1A_1 A2A_2 ldots\\ldots ANA_N

Output

Print -1 if there is no even number represented as the sum of two different elements of AA.

If such an even number exists, print the maximum such number.


Sample Input 1

3
2 3 4

Sample Output 1

6

The values represented as the sum of two distinct elements of AA are 55, 66, and 77. We have an even number here, and the maximum is 66.


Sample Input 2

2
1 0

Sample Output 2

-1

The value represented as the sum of two distinct elements of AA is 11. We have no even number here, so -1 should be printed.