Problem

21 /21


Maximum even amount

Problem

The input of the program is a sequence of N integers (\(N>1\)) . It is necessary to find such a set of numbers from the given series that their sum will be even and maximum. Number of numbers in set k (\(1 <= k <= N\)).


Input
The first line of the input specifies the number of numbers N (\(2 <= N <= 10000\)). Each of the following N lines contains a single integer in the range of –100 to 100. 

Imprint
Output one number: the maximum even sum. 
 

 

Examples
# Input Output
1 8
-5
-13
15
-9
-3
-6
-10
-8
12