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.io.*;
public class recycle {
	
	public static void main(String[] args) throws IOException {
		
		FastScanner qwe = new FastScanner(System.in);
				
		int n = qwe.nextInt();
		
		long ans =  0;
		
		long odd = 0;
		
		ArrayList<Long> nums = new ArrayList<Long>();
		for (int i = 0; i < n; i++) {
			nums.add(qwe.nextLong());
		}
		Collections.sort(nums);
	
		for (int i = 0; i < nums.size(); i++) {
			long next = nums.get(nums.size()-1-i);
					
			if(next % 2 == 0) ans += next;
			else odd += next;
			
			if(odd % 2 == 0){
				ans += odd;
				odd = 0;
			}
			
		}
		
		System.out.println(ans);
		
	}
	
	

	

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner(InputStream in) throws IOException{
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer(br.readLine().trim());
		}
		public FastScanner(File in) throws IOException{
			br = new BufferedReader(new FileReader(in));
			st = new StringTokenizer(br.readLine().trim());
		}
		public int numTokens() throws IOException {
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return numTokens();
			}
			return st.countTokens();
		}
		public String next() throws IOException {
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return next();
			}
			return st.nextToken();
		}
		public double nextDouble() throws IOException{
			return Double.parseDouble(next());
		}
		public float nextFloat() throws IOException{
			return Float.parseFloat(next());
		}
		public long nextLong() throws IOException{
			return Long.parseLong(next());
		}
		public int nextInt() throws IOException{
			return Integer.parseInt(next());
		}
		public String nextLine() throws IOException{
			return br.readLine().trim();
		}
	}
}

