~/algor $ cat problems/juftsiz-son
The unpaired number
Medium
1000 ms
64 MB
45%
$n$ integers $a_{1}, a_{2}, \ldots, a_{n}$ are given. One value among them occurs exactly once, and each of the other values occurs an even number of times ($2$, $4$, $6$, $\ldots$ times). Find the value that occurs once.
Input
The first line contains an odd positive integer $n$. The second line contains $n$ integers $a_{i}$ separated by spaces.
Output
One integer — the value that occurs once.
Note
$1 \le n \lt 2 * 10^{5}$
$0 \le a_{i} \le 10^{18}$
Examples
Input #1
5 4 1 2 1 2
Output #1
4
Input #2
1 7
Output #2
7