Kingdom of Ants
The Chimera Ants are building their own kingdom!
There are
Some regions or parts of some regions might be assigned to multiple ants. Usually, this would pose no problem: when two ants disagree, all the ants assigned to this region will vote for the two options, and the option with more votes will be implemented. However, this method does not work if a non-zero, even number of ants are assigned to a region, as the voting result may be a tie. The ants would like to know what are the total area of such region. Please help them!
Input
The first line of input contains a single integer
In the next
Output
Print a single integer — the total area assigned to a positive even number of ants.
Explanation of sample test
![\includegraphics[width=0.45\textwidth ]{illustration.png}](/https://open.kattis.com/problems/kingdomofants/file/statement/en/img-0001.png)
Sample Input 1 | Sample Output 1 |
---|---|
2 10 10 20 20 15 15 25 30 |
25 |