import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int sum = 0;
StringTokenizer st = new StringTokenizer(br.readLine());
int minOdd = Integer.MAX_VALUE;
for(int i=0; i<n; i++){
int num = Integer.parseInt(st.nextToken());
sum += num;
if(num % 2 == 1 && minOdd > num) minOdd = num;
}
if(sum % 2 == 0) System.out.println(sum);
else {
sum -= minOdd;
System.out.println(sum);
}
br.close();
}
}
'Coding Test > 백준' 카테고리의 다른 글
[백준/자바] 10986 - 나머지 합 (0) | 2023.05.31 |
---|---|
[백준/자바] 28061 - 레몬 따기 (0) | 2023.05.23 |
[백준/자바] 28074 - 모비스 (0) | 2023.05.23 |
[백준/자바] 28014 - 첨탑 밀어서 부수기 (0) | 2023.05.12 |
[백준/자바] 2798 - 블랙잭 (1) | 2023.05.12 |