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.*;
import java.util.*;


public class ready {
	public static class FastReaderFile
    {
        BufferedReader br;
        StringTokenizer st;
        public FastReaderFile(InputStream in)
        {
            br = new BufferedReader(new
            InputStreamReader(in));
            
        }
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt()
        {
            return Integer.parseInt(next());
        }

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

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt()
        {
            return Integer.parseInt(next());
        }

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

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static PrintWriter out;
    public static int ser ( int x[] , int start , int end , int val )
    {
        while ( start <= end )
        {
            int mid = ( start + end ) / 2 ;
            if ( x[mid] == val )
                return mid ;
            
            if ( x[ mid ] <= val )
                start = mid + 1 ;
            else
                end = mid - 1 ;
        }
        return -start - 1 ;
    }
    public static  boolean isPrime( long n)
    {
        if (n < 2)  return false;
        if (n < 4)  return true;
        
        if (n%2 == 0 || n%3 == 0) return false;

        for (long i = 5 ; i * i <= n ; i = i + 6 )
            if ( n % i == 0 || n % ( i + 2 ) == 0)
                return false ;

        return true;
    }
    static long gcd(long a, long b) 
    {
        return b == 0 ? (a < 0 ? -a : a) : gcd(b, a % b);
    }
    static long lcm(long a, long b)
    {
        long lcm = (a / gcd(a, b)) * b;
        return lcm > 0 ? lcm : -lcm ;
    }
    public static int search( int x[] , int val )
    {
        return ser( x , 0 , x.length - 1 , val  );
    }
    public static String remove ( String s , int i )
    {
        return s.substring(0, i) + s.substring(i+1) ;
    }   
    public static int ret( String s , int st , int end , int x[][] )
    {
            if ( st >= end  )
                    return 0 ;
            if ( x[st][end] != 0 )
            	return x[st][end] ;
            if ( s.charAt(end) != s.charAt(st) )
                        return x[st][end] = 1 + Math.min( ret( s , st + 1 , end , x ) ,  ret( s , st , end - 1 , x ) )  ;
            
           else
                        return x[st][end] = ret( s , st + 1 , end - 1 , x ) ;
    }
//            for (Map.Entry<Integer, Integer> e : x.entrySet()) 
//                        {
//                            e.getValue() , e.getKey

    public static void main(String[] args) throws FileNotFoundException {
//        TODO code application logic here
        FastReader in = new FastReader();
//        Scanner in = new Scanner(System.in) ;
//        FastReaderFile in = new FastReaderFile(new FileInputStream("fruits.in")) ;
//        StringBuilder r = new StringBuilder();
//        out = new PrintWriter(new BufferedOutputStream(new FileOutputStream("output.txt")), true) ;
        out = new PrintWriter(new BufferedOutputStream(System.out), true) ;
        int n = in.nextInt() ;
        long sum = 0 , odd = (long) 1e10 + 1 ;
        while ( n-- > 0 )
        {
        	long a = in.nextLong() ;
        	sum += a ;
        	if ( a % 2 == 1 )
        		odd = Math.min(odd, a) ;
        }
        if ( sum % 2 == 1 )
        	out.println(sum - odd);
        else
        	out.println(sum);
    }
}