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.

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;


public class Main {
	
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long n =  Long.parseLong(scn.nextLine());
		BigInteger bi = new BigInteger("9999999999999999999999999");
		BigInteger c = new BigInteger("9999999999999999999999999");
		BigInteger sum = new BigInteger("0");
		long odds = 0;
		
		String str = scn.nextLine();
		String arr[] = str.split(" ");
		for(int i=0;i<n;i++){
			
			c = new BigInteger(arr[i]);
			int ld = arr[i].charAt(arr[i].length()-1) - '0';
			if(ld%2==1 ){
				if(c.compareTo(bi)<0)
					bi = c;
				odds++;
			}
			
			sum = sum.add(c);
		}
		
		if(odds%2==1){
			sum = sum.subtract(bi);
		}
		System.out.println(sum.toString());
		
		scn.close();
	}
	
	private static float sign (Point p1, Point p2, Point p3)
	{
	    return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y);
	}

	private static boolean pointInTriangle (Point pt, Point v1, Point v2, Point v3)
	{
	    boolean b1, b2, b3;

	    b1 = sign(pt, v1, v2) < 0.0f;
	    b2 = sign(pt, v2, v3) < 0.0f;
	    b3 = sign(pt, v3, v1) < 0.0f;

	    return ((b1 == b2) && (b2 == b3));
	}
	

	private static double logOfBase(int base, int num) {
		return Math.log(num) / Math.log(base);
	}	

}


class Point{
	long x;
	long y;
	public Point(long x, long y){this.x =x; this.y=y;}
	public double distance(Point p){
		return Math.sqrt((this.x - p.x)*(this.x - p.x)+(this.y - p.y)*(this.y - p.y));
	}
	public double slope(Point p){
		return (p.y - this.y) / (p.x - this.x);
	}
}

class Triangle{
	Point a;
	Point b;
	Point c;
	
	double ab;
	double bc;
	double ac;
	
	double A;
	double B;
	double C;
	
	Triangle(int ax, int ay, int bx, int by, int cx, int cy){
		a = new Point(ax, ay);
		b = new Point(bx, by);
		c = new Point(cx, cy);
		
		ab = a.distance(b);
		bc = b.distance(c);
		ac = a.distance(c);
		
		B = Math.toDegrees(Math.acos((ab*ab + bc*bc - ac*ac)/(2*ab*bc)));
		A = Math.toDegrees(Math.acos((ab*ab + ac*ac - bc*bc)/(2*ab*ac)));
		C = Math.toDegrees(Math.acos((bc*bc + ac*ac - ab*ab)/(2*bc*ac)));
		
	}
	
	public boolean isScalane(){
		if( !isEqual(ab, bc) && !isEqual(ab,ac) && !isEqual(bc,ac))
			return true;
		else
			return false;
	}
	
	public boolean isIsosceles(){
		if(isEqual(ab,bc) || isEqual(ab,ac) || isEqual(bc,ac))
			return true;
		else
			return false;
	}
	
	public boolean isRight(){
		if(isEqual(A, 90.0) || isEqual(B, 90.0) || isEqual(C, 90.0))
			return true;
		else
			return false;
	}
	public boolean isAcute(){
		if( isLess(A , 90.0) && isLess(B, 90.0) && isLess(C, 90.0))
			return true;
		else
			return false;
	}
	
	public boolean isObtuse(){
		if(isGreater(A , 90.0) || isGreater(B, 90) || isGreater(C, 90))
			return true;
		else
			return false;
	}
	
	private static boolean isGreater(double a, double b){
		double c = a - b;
		if(c>0.000001) return true;
		else return false;
	}
	private static boolean isLess(double a, double b){
		double c = b - a;
		if(c>0.000001) return true;
		else return false;
	}
	
	private static boolean isEqual(double a, double b){
		double c = Math.abs(a - b);
		if(c>0.000001) return false;
		else return true;
	}
	


}

