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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.io.*;
import java.math.*;
import java.util.StringTokenizer;
public class MaxSum {
    static PrintStream p = System.out;
    public static void main(String args[] ) throws Exception {
        int n=nextInt();
		long sum=0;
		int min=1000000001;
		for(int i=0;i<n;i++){
			int a=nextInt();
			if(a%2==1 &&a<min)
				min=a;
			sum+=a;
		}
		if(sum%2==1)
			sum-=min;
		p.println(sum);
    }



//-------------------------------------------------fast Method---------------------------------------------------------------\\
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));;
    static StringTokenizer st;
    private static int[] inta(int n){
        int [] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = nextInt();
            return a;
    }
    private static long[] longa(long n){
    long[] a = new long[(int)n];
        for(int i = 0;i < n;i++)a[i] = nextLong();
            return a;
    }
    private static void pla(long[] a){
        for(int i = 0;i <a.length;i++)
            p.print(a[i]+" ");
    }
    private static void pia(int[] a){
        for(int i = 0;i <a.length;i++)
            p.print(a[i]+" ");
    }
    private static String next(){
        while (st == null || !st.hasMoreElements()){
            try{
                st = new StringTokenizer(br.readLine());
            }
            catch (IOException  e){
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }
    private static int nextInt(){
        return Integer.parseInt(next());
    }

    private static long nextLong(){
        return Long.parseLong(next());
    }

    private static double nextDouble(){
        return Double.parseDouble(next());
    }
    private static String nextLine(){
        String str = "";
        try{
            str = br.readLine();
        }
        catch (IOException e){
            e.printStackTrace();
        }
        return str;
    }
//-------------------------------------------------fast Method---------------------------------------------------------------\\
} 