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.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
 
public class Main implements Runnable {
     
    int maxn = (int)1e2+10;
    int mod = (int)1e9+7;
    int inf = (int)1e9;
    int n,m,k;
    int a[] = new int[maxn];
    
    void solve() throws Exception {
    	
    	n = in.nextInt();
    	ArrayList<Integer> list = new ArrayList<>();
    	
    	long sum = 0;
    	for (int i=1; i<=n; i++) {
    		int t = in.nextInt();
    		if (t%2!=0) {
    			list.add(t);
    		}
    		sum+=t;
    	}
    	
    	Collections.sort(list);
    	
    	if (sum%2!=0) {
    		sum-=list.get(0);
    	}
    	
    	out.println(sum);
    }    

	class Pair implements Comparable<Pair>{
        int x,y; 
        public Pair (int x, int y) {
            this.x = x;
            this.y = y;
        }
 
        @Override
        public int compareTo(Pair p) {
            if (x>p.x) return 1;
            else if (x==p.x) {
                if (y>p.y) return 1;
                else if (y==p.y) return 0;
                else return -1;
            } else {
                return -1;
            }
         
        }
    }
     
    String fileInName = "network";
    boolean file = false;
    boolean isAcmp = true;
     
    static Throwable throwable;
    public static void main (String [] args) throws Throwable {
    	Locale.setDefault(new Locale("en", "US"));
        Thread thread = new Thread(null, new Main(), "", (1 << 26));
        thread.start();
        thread.join();
        thread.run();
        if (throwable != null)
            throw throwable;
    }
     
    FastReader in;
    PrintWriter out;
 
    public void run() {
        String fileIn = "input.txt";
        String fileOut = "output.txt";
         
        try {
            if (isAcmp) {
                if (file) {
                    in = new FastReader(new BufferedReader(new FileReader(fileIn)));
                    out = new PrintWriter (fileOut);
                } else {
                    in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
                    out = new PrintWriter(System.out);
                }
            } else if (file) {
                in = new FastReader(new BufferedReader(new FileReader(fileInName+".in")));
                out = new PrintWriter (fileInName + ".out");
            } else {
                in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
                out = new PrintWriter(System.out);
            }
             
            solve();
        } catch(Exception e) {
            throwable = e;
        } finally {
            out.close();
        }
 
    }
}
 
class FastReader {
    BufferedReader bf;
    StringTokenizer tk = null;
 
    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }
     
    public String nextToken () throws Exception {
        if (tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine());
        }
        if (!tk.hasMoreTokens()) return nextToken();
        else
            return tk.nextToken();
    }
     
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }
     
    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }
     
    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}