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 Solution{
	public Solution(){
		Scanner sc = new Scanner(System.in);
		long n = sc.nextInt();
		long minOdd = -1;
		long res = 0;
		long num = 0;
		long oddCount = 0;
		
		for(int i=0; i<n; i++){
			num = sc.nextInt();
			res += num;
			
			if(num%2 != 0){
				oddCount++;
				if(num < minOdd || minOdd == -1){
					minOdd = num;
				}
			}
		}
		
		if(oddCount%2 != 0){
			res -= minOdd;
		}
		
		System.out.println(res);
	}
	
	int indexOfVowel(String str, int start){
		if(start >= str.length()){
			return -1;
		}
		
		int minIndex = str.indexOf('A', start);
		int index = str.indexOf('E', start);
		
		if(minIndex == -1 || index < minIndex){
			if(index != -1){
				minIndex = index;
			}
		}
		
		index = str.indexOf('I', start);
		
		if(minIndex == -1 || index < minIndex){
			if(index != -1){
				minIndex = index;
			}
		}
		
		index = str.indexOf('O', start);
		
		if(minIndex == -1 || index < minIndex){
			if(index != -1){
				minIndex = index;
			}
		}
		
		index = str.indexOf('U', start);
		
		if(minIndex == -1 || index < minIndex){
			if(index != -1){
				minIndex = index;
			}
		}
		
		index = str.indexOf('Y', start);
		
		if(minIndex == -1 || index < minIndex){
			if(index != -1){
				minIndex = index;
			}
		}
		
		return minIndex;
	}
	
	int binarySearch(int arr[], int l, int r, int x) 
    { 
        if (r >= l) { 
            int mid = l + (r - l) / 2; 
  
            // If the element is present at the 
            // middle itself 
            if (arr[mid] == x) 
                return mid; 
  
            // If element is smaller than mid, then 
            // it can only be present in left subarray 
            if (arr[mid] > x) 
                return binarySearch(arr, l, mid - 1, x); 
  
            // Else the element can only be present 
            // in right subarray 
            return binarySearch(arr, mid + 1, r, x); 
        } 
  
        // We reach here when element is not present 
        // in array 
        return -1; 
    }
	
	int partition(int arr[], int[] dep, int low, int high) 
    { 
        int pivot = arr[high];  
        int i = (low-1); // index of smaller element 
        for (int j=low; j<high; j++) 
        { 
            // If current element is smaller than or 
            // equal to pivot 
            if (arr[j] <= pivot) 
            { 
                i++; 
  
                // swap arr[i] and arr[j] 
                int temp = arr[i]; 
                arr[i] = arr[j]; 
                arr[j] = temp;
				
				if(dep != null){
					temp = dep[i];
					dep[i] = dep[j];
					dep[j] = temp;
				}
            } 
        } 
  
        // swap arr[i+1] and arr[high] (or pivot) 
        int temp = arr[i+1]; 
        arr[i+1] = arr[high]; 
        arr[high] = temp;
		
		if(dep != null){
			temp = dep[i+1];
			dep[i+1] = dep[high];
			dep[high] = temp;
		}
  
        return i+1; 
    } 
  
  
    /* The main function that implements QuickSort() 
      arr[] --> Array to be sorted, 
      low  --> Starting index, 
      high  --> Ending index */
    void sort(int arr[], int[] dep, int low, int high) 
    { 
        if (low < high) 
        { 
            /* pi is partitioning index, arr[pi] is  
              now at right place */
            int pi = partition(arr, dep, low, high); 
  
            // Recursively sort elements before 
            // partition and after partition 
            sort(arr, dep, low, pi-1); 
            sort(arr, dep, pi+1, high); 
        } 
    }
	
	public static void main(String[] args){
		new Solution();
	}
}