import java.io.*;
import java.util.*;
public class cp550
{
static Scanner sc=new Scanner(System.in);
public static void main(String args[])throws Exception
{
  int n=sc.nextInt();
  int a[]=new int[n];
  for(int i=0;i<n;i++)
  {
   a[i]=sc.nextInt();
  }
   int f=1;   //flag set to 0 if number is odd  
   if(a[0]%2==0)
   {
   f=0;       //flag set to 0 if number is even
   }
   a[0]=0;
   int i=1;
   do
   {
    if(f==0)
    {
     if((a[i]%2)==1&&a[i]!=0)
     {
      f=1;
      a[i]=0;
      i=1;
     }
    } 
    if(f==1)
    {
     if((a[i]%2)==0&&a[i]!=0)
     {
      f=0;
      a[i]=0;
      i=1;
     }
    }
    i++; 
    }while(i<n);
    
   int sum=0;
   for(int j=0;j<n;j++)
   {
    if(a[j]!=0)
    sum=sum+a[j];
   }
   System.out.println(sum);
 }
}