Codeforces Round 341 (Div. 2)
A
Wet Shark and Odd and Even
Codeforces
900
原题
←B →
翻译中…

Today, Wet Shark is given $*n*$ integers. Using any of these integers no more than once, Wet Shark wants to get maximum possible even (divisible by $2$) sum. Please, calculate this value for Wet Shark.

翻译中…

Note, that if Wet Shark uses no integers from the $*n*$ integers, the sum is an even integer $0$.

翻译中…

Input

翻译中…

The first line of the input contains one integer, $*n*$ ($1 ≤ *n* ≤ 100 000$). The next line contains $*n*$ space separated integers given to Wet Shark. Each of these integers is in range from $1$ to $10^{9}$, inclusive.

翻译中…

Output

翻译中…

Print the maximum possible even sum that can be obtained if we use some of the given integers.

翻译中…

Note

翻译中…

In the first sample, we can simply take all three integers for a total sum of $6$.

翻译中…

In the second sample Wet Shark should take any four out of five integers $999 999 999$.

翻译中…

样例

Input #1
3
1 2 3
Output #1
6
InputCopy OutputCopy
Input #2
5
999999999 999999999 999999999 999999999 999999999
Output #2
3999999996
InputCopy OutputCopy
题目信息
题号
621A
时间限制
2 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。