#D9568. Bugged
Bugged
Bugged
You are taking a computer-based examination. The examination consists of N questions, and the score allocated to the i-th question is s_i. Your answer to each question will be judged as either "correct" or "incorrect", and your grade will be the sum of the points allocated to questions that are answered correctly. When you finish answering the questions, your answers will be immediately judged and your grade will be displayed... if everything goes well.
However, the examination system is actually flawed, and if your grade is a multiple of 10, the system displays 0 as your grade. Otherwise, your grade is displayed correctly. In this situation, what is the maximum value that can be displayed as your grade?
Constraints
- All input values are integers.
- 1 ≤ N ≤ 100
- 1 ≤ s_i ≤ 100
Input
Input is given from Standard Input in the following format:
N s_1 s_2 : s_N
Output
Print the maximum value that can be displayed as your grade.
Examples
Input
3 5 10 15
Output
25
Input
3 10 10 15
Output
35
Input
3 10 20 30
Output
0
inputFormat
input values are integers.
- 1 ≤ N ≤ 100
- 1 ≤ s_i ≤ 100
Input
Input is given from Standard Input in the following format:
N s_1 s_2 : s_N
outputFormat
Output
Print the maximum value that can be displayed as your grade.
Examples
Input
3 5 10 15
Output
25
Input
3 10 10 15
Output
35
Input
3 10 20 30
Output
0
样例
3
10
10
15
35