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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author T.C.D
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastInputReader in = new FastInputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastInputReader in, PrintWriter out) {
            int n = in.nextInt();
            Integer[] a = new Integer[n];
            int odd = 0;
            long sum = 0;
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
                if ((a[i] & 1) == 1) {
                    odd++;
                }
                sum += a[i];
            }
            Arrays.sort(a);
            if ((odd & 1) == 1) {
                for (int i = 0; i < n; i++) {
                    if ((a[i] & 1) == 1) {
                        sum -= a[i];
                        break;
                    }
                }
            }
            out.println(sum);

        }

    }

    static class FastInputReader {
        static InputStream is;
        static private byte[] buffer;
        static private int lenbuf;
        static private int ptrbuf;

        public FastInputReader(InputStream stream) {
            is = stream;
            buffer = new byte[1024];
            lenbuf = 0;
            ptrbuf = 0;
        }

        private int readByte() {
            if (lenbuf == -1)
                throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = is.read(buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0)
                    return -1;
            }
            return buffer[ptrbuf++];
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
                ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}