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.util.*;
import java.util.concurrent.ArrayBlockingQueue;
import java.io.*;
public class A 
{
	public static void main(String[] args)
	{
		new A().solve();
	}

	FasterScanner in=new FasterScanner();
	PrintWriter out=new PrintWriter(System.out);


	public void solve()
	{
		//		int tt=in.nextInt();
		//		loop:
		//			for(int ii=0;ii<tt;ii++)
		{
			int n=in.nextInt();
			long sum=0;
			int min=Integer.MAX_VALUE;
			for(int i=0;i<n;i++)
			{
				int x=in.nextInt();
				sum+=x;
				
				if(x%2==1)
				{
					min=Math.min(min, x);
				}
			}
			if(sum%2==0)
			{
				out.println(sum);
			}
			else
			{
				out.println(sum-min);
			}
		}
		out.close();
	}

	class Edge
	{
		int nextv;
		int r;
		int t;
		public Edge(int ver,int r,int t)
		{
			this.nextv=ver;
			this.r=r;
			this.t=t;
		}
	}

	class s implements Comparable<s>
	{
		int idx;
		int w;
		public s(int i)
		{
			this.idx=i;
			this.w=Integer.MAX_VALUE;
		}

		@Override
		public int compareTo(s o) {
			// TODO Auto-generated method stub
			if(this.w!=o.w)
				return Integer.compare(this.w, o.w);
			else
				return Integer.compare(this.idx, o.idx);
		}
	}

	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		private boolean isEndOfLine(int c) {
			return c=='\n' || c=='\r' || c==-1;
		}
		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		private boolean isSpaceChar(int c) {
			return c=='\n' || c=='\r' || c==-1 || c==' ' || c=='\t';
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}

			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public double nextDouble()
		{
			return Double.parseDouble(nextString());
		}
		public int[] nextIntArray(int n)
		{
			int[] arr=new int[n];
			for(int i=0;i<n;i++)
			{
				arr[i]=nextInt();
			}
			return arr;
		}
		public long[] nextLongArray(int n)
		{
			long[] arr=new long[n];
			for(int i=0;i<n;i++)
			{
				arr[i]=nextLong();
			}
			return arr;
		}
		public int[] nextIntArray10(int n)
		{
			int[] arr=new int[n+1];
			for(int i=1;i<=n;i++)
			{
				arr[i]=nextInt();
			}
			return arr;
		}
		public long[] nextLongArray10(int n)
		{
			long[] arr=new long[n+1];
			for(int i=1;i<=n;i++)
			{
				arr[i]=nextLong();
			}
			return arr;
		}
		public int[] nextIntArray11(int n)
		{
			int[] arr=new int[n+2];
			for(int i=1;i<=n;i++)
			{
				arr[i]=nextInt();
			}
			return arr;
		}
		public long[] nextLongArray11(int n)
		{
			long[] arr=new long[n+2];
			for(int i=1;i<=n;i++)
			{
				arr[i]=nextLong();
			}
			return arr;
		}
	}

}