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 109, inclusive. 

Output

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

Examples

Input

3
1 2 3


Output

6

Input

5
999999999 999999999 999999999 999999999 999999999


Output

3999999996

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.

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

import javax.xml.bind.ValidationEvent;

//codeforce
public class main2222222 {

	private static BufferedReader in;
	private static PrintWriter out;
	private static StringTokenizer input;

	public static void main(String[] args) throws IOException {
		// -------------------------------------------------------------------------
		// Initializing...
		new main2222222();
		// -------------------------------------------------------------------------
		// put your code here... :)
		int n = nextInt();
		ArrayList<Long> oddValues = new ArrayList<>();
		long result = 0;
		for (int i = 0; i < n; i++) {
			long temp = nextInt();
			if (temp % 2 == 0) {
				result += temp;
			} else {
				oddValues.add(temp);
			}
		}
		Collections.sort(oddValues);
		long preOdd = 0;
		int count = 0;
		for (int index = oddValues.size()-1; index >= 0; index--) {
			count++;
			if (count == 2) {
				result += preOdd + oddValues.get(index);
				preOdd = 0;
				count = 0;
			} else {
				preOdd = oddValues.get(index);
			}
		}
		System.out.println(result);
		// writeln("");
		// -------------------------------------------------------------------------
		// closing up
		end();
		// --------------------------------------------------------------------------
	}

	private static String nextString() throws IOException {
		if (!input.hasMoreTokens())
			input = new StringTokenizer(in.readLine());
		return input.nextToken();
	}

	public main2222222() throws IOException {
		// Input Output for Console to be used for trying the test samples of
		// the problem
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		// -------------------------------------------------------------------------
		// Initalize Stringtokenizer input
		input = new StringTokenizer(in.readLine());
	}

	private static int nextInt() throws IOException {
		if (!input.hasMoreTokens())
			input = new StringTokenizer(in.readLine());
		return Integer.parseInt(input.nextToken());
	}

	private static void end() throws IOException {
		in.close();
		out.close();
		System.exit(0);
	}

}
