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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.security.interfaces.DSAKey;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class a {
	public static int k;

	public static class node implements Comparable<node> {
		int a;
		int idx;

		node(int a, int idx) {
			this.a = a;
			this.idx = idx;

		}

		@Override
		public int compareTo(node o) {
			if (o.a > a)
				return 1;
			else if (o.a < a)
				return -1;
			return 0;
		}
	}

	public static class point {
		int x;
		int y;

		point(int x, int y) {
			this.x = x;
			this.y = y;
		}

		point() {
		}

	}

	public static BigInteger gcd(BigInteger a, BigInteger b) {
		if (b.equals(BigInteger.ZERO))
			return a;
		return gcd(b, a.mod(b));
	}

	public static long gcd1(long a, long b) {
		if (b == 0)
			return a;
		return gcd1(b, a % b);
	}

	public static ArrayList<Integer> prime;

	public static void sieve(int n) {
		boolean vis[] = new boolean[n + 5];
		vis[1] = true;
		vis[0] = true;
		for (int i = 2; i <= n; i++) {
			if (!vis[i]) {
				prime.add(i);
				for (long j = (long) i * (long) i; j <= n; j += i) {
					vis[(int) j] = true;
				}
			}
		}
	}

	public static int tree[][];
	public static boolean end[][];
	public static int counter;

	public static void trie(String a) {
		int st = 0;

		for (int i = 0; i < a.length(); i++) {
			if (tree[a.charAt(i) - 'a'][st] == 0) {
				tree[a.charAt(i) - 'a'][st] = counter++;
			}

			st = tree[a.charAt(i) - 'a'][st];
		}
		end[a.charAt(a.length() - 1) - 'a'][st] = true;

	}

	public static int seg[][];

	public static int get(int s, int e, int p, int from, int to, int seg[]) {
		if (s >= from && e <= to)
			return seg[p];
		if (s > to || e < from)
			return 0;
		int mid = (s + e) / 2;
		int one = get(s, mid, p * 2, from, to, seg);
		int two = get(mid + 1, e, p * 2 + 1, from, to, seg);
		return Math.max(one, two);
	}

	public static long comp(int n, int r) {
		long ans = 1;
		r = Math.min(r, n - r);
		for (int i = 1; i <= r; i++) {
			ans = ans * ((long) n - (long) i + 1L) / (long) i;
		}
		return ans;
	}

	public static ArrayList<Integer> arr[];
	public static boolean vis[];
	public static Stack<Integer> S;

	public static void bfs(int node) {
		for (int i = 0; i < arr[node].size(); i++) {
			int k = arr[node].get(i);
			if (vis[k] == false) {
				vis[k] = true;
				S.push(k);
				bfs(k);
			}
		}
		S.push(node);
	}

	public static void dfs(int node) {

		for (int i = 0; i < arr[node].size(); i++) {
			int k = arr[node].get(i);
			if (vis[k] == false) {
				vis[k] = true;
				dfs(k);
			}
		}
	}

	public static boolean chPrime(int r) {

		for (int i = 2; i * i <= r; i++) {
			if (r % i == 0)
				return false;
		}
		return true;
	}

	public static int len(long ai) {
		String temp = "" + ai;

		return temp.length();
	}

	public static int f_digit(long ai, int f) {
		String temp = "" + ai;

		return (temp.charAt(f) - '0');

	}

	public static int binary(int a[], int val) {

		int low = 0;
		int high = a.length;

		int mid = (low + high) / 2;
		while (high - low > 1) {
			if (a[mid] <= val) {
				low = mid;
			} else if (a[mid] > val)
				high = mid;

			mid = (low + high) / 2;
		}
		if (a[high] == val)
			return high;
		return low;
	}

	public static long mod = (long) Math.pow(10, 9) + 7;

	public static int bin(int a[], int val) {

		int low = 0;
		int high = a.length - 1;

		int mid = (low + high) / 2;

		while (high - low > 1) {
			if (a[mid] > val) {
				high = mid;
			} else
				low = mid;

			mid = (low + high) / 2;
		}

		return high;

	}

	public static int lcs(int a[]) {

		int size[] = new int[a.length];
		int arr[] = new int[a.length];
		Arrays.fill(arr, Integer.MAX_VALUE);
		size[0] = 1;
		arr[0] = a[0];
		int max = 1;
		for (int i = 1; i < a.length; i++) {
			int get = Arrays.binarySearch(arr, a[i]);
			if (get < 0) {
				get *= -1;
				get--;
			}

			size[i] = get + 1;
			arr[get] = a[i];
			max = Math.max(max, get + 1);
		}

		return max;
	}

	private static ArrayList<Integer> siev(int max) {
		boolean prime[] = new boolean[max + 1];
		ArrayList<Integer> ans = new ArrayList();
		for (int i = 2; i * i <= max; i++) {
			if (!prime[i]) {
				for (int j = i * i; j <= max; j += i)
					prime[j] = true;

			}
		}

		for (int i = 2; i <= max; i++)
			if (!prime[i])
				ans.add(i);

		return ans;

	}

	public static int gcd(int x, int y) {
		if (y == 0)
			return x;
		return gcd(y, x % y);
	}

	public static boolean canFormTraingle(point p1, point p2, point p3) {

		if (p1.x == p2.x && p2.x == p3.x)
			return false;
		if (p1.y == p2.y && p2.y == p3.y)
			return false;

		if (p1.x == p2.x || p1.x == p3.x || p2.x == p3.x)
			return true;
		if (p1.y == p2.y || p1.y == p3.y || p2.y == p3.y)
			return true;

		int deltay = p2.y - p1.y;
		int deltax = p2.x - p1.x;
		int gcd1 = gcd(deltax, deltay);
		deltax /= gcd1;
		deltay /= gcd1;

		int deltay2 = p3.y - p1.y;
		int deltax2 = p3.x - p1.x;
		int gcd2 = gcd(deltax, deltay);
		deltax2 /= gcd2;
		deltay2 /= gcd2;

		if (deltax == deltax2 && deltay == deltay2)
			return false;
		return true;
	}

	public static class in {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		static String next() throws IOException {
			while (!tokenizer.hasMoreTokens())
				tokenizer = new StringTokenizer(reader.readLine());
			return tokenizer.nextToken();
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

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

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

	public static long dis(int x1, int y1, int x2, int y2) {

		return (long) (x1 - x2) * (long) (x1 - x2) + (long) (y1 - y2)
				* (long) (y1 - y2);
	}

	public static int a[][];
	public static int parent[];
	public static boolean ok = false;
	public static boolean visit[];
	public static int n;
	public static long mask = 0L;

	public static void dfs(int i, int last, int c) {
		if (c == n - 1) {
			ok = true;
			return;
		}
		if (ok)
			return;

		for (int j = 0; j < n; j++) {
			if (!visit[j] && a[i][j] > last) {
				visit[j] = true;
				parent[i] = j;
				dfs(j, a[i][j], c + 1);

			}
		}
	}

	public static double area(point p1, point p2, point p3) {
		return Math.abs((p1.x * (p2.y - p3.y) + p2.x * (p3.y - p1.y) + p3.x
				* (p1.y - p2.y)) / 2.0);
	}

	public static boolean pointIsInside(point p1, point p2, point p3, point p) {
		/* Calculate area of triangle ABC */
		double A = area(p1, p2, p3);

		/* Calculate area of triangle PBC */
		double A1 = area(p, p2, p3);

		/* Calculate area of triangle PAC */
		double A2 = area(p1, p, p3);

		/* Calculate area of triangle PAB */
		double A3 = area(p1, p2, p);
		// System.out.println(A1 + " " + A + " " + A2);
		/* Check if sum of A1, A2 and A3 is same as A */
		return (A == A1 + A2 + A3);

	}

	public static void main(String[] args) throws IOException {
		// BufferedReader in = new BufferedReader(new
		// InputStreamReader(System.in));
		// BufferedReader in = new BufferedReader(new FileReader(
		// "coding_contest_creation.txt"));
		// System.out.println(-70 % 3);
		// int aa[] = { 1, 2, 5 };
		// dsfdssdgsdgsggsafal;fksd;l
		// System.out.println(Arrays.binarySearch(aa, 2));
		// goooooooooog
		StringBuilder qq = new StringBuilder();
		// PrintWriter out = new PrintWriter(new
		// OutputStreamWriter(System.out));
		// PrintWriter out = new PrintWriter(new FileWriter("out.txt"));

		in.init(System.in);
		PrintWriter out = new PrintWriter(System.out);
		ArrayList<Long> arr = new ArrayList();

		int n = in.nextInt();
		long sum = 0;
		for (int i = 0; i < n; i++) {
			long a = in.nextLong();
			if (a % 2 == 0)
				sum += a;
			else
				arr.add(a);
		}
		Collections.sort(arr);
		Queue<Long> queue = new LinkedList();
		for (int i = arr.size() - 1; i >= 0; i--) {
			queue.add(arr.get(i));
		}

		while (queue.size() > 1) {
			long on = queue.poll();
			long two = queue.poll();
			sum += on + two;

		}
		System.out.println(sum);
		out.close();

	}

}