Gromozeka has
n-1
integers written on cards and laid out in a row in random order. It computed a bitwise XOR (
xor
) between all the numbers written. The calculated number (
X
) he wrote down on a new card and added it to the end of all cards with numbers. Now he has n number cards. He shuffled all the cards and arranged them again in a row in random order.
Gromozeka showed you all the
n
cards and asks you to guess the number
X
that was written on the new card.
Input
The first line of the input contains an integer
n
- the number of cards with numbers (2 <=
n
<= 100
)
. The second line contains
n
integers - the numbers written on the cards (each number belongs to the interval [0, 127]).
Imprint
Print the answer one integer - the number
X
that was written on the new card.
It is guaranteed that the answer exists. If there are multiple answers, print the minimum
X
.
Examples
# |
Input |
Output |
1 |
4
4 3 2 5
| 2 |