409993: GYM103895 C Ellie the Elephant

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Ellie the Elephanttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Ellie is an elephant searching for a prize. He is given $$$n$$$ baskets of peanuts and is told to find the basket that has a unique number of peanuts. Every other basket has exactly 1 other basket that has the same number of peanuts that it has. In formal terms, if a basket has $$$p$$$ peanuts, then exactly 1 other basket will have exactly $$$p$$$ peanuts also. Determine how many peanuts are in the basket that has a unique number of peanuts.

Input

The first and only line of input will contain $$$n$$$ integers ($$$1 \leq n \leq 10000$$$)., representing the number of peanuts in each of the $$$n$$$ baskets. Each basket can have $$$x$$$ peanuts, where ($$$1 \leq x \leq 10000$$$).

Output

Determine the number of peanuts in the basket that has a unique number of peanuts.

ExamplesInput
6 7 8 7 6
Output
8
Input
1 1 2 2 3
Output
3

加入题单

上一题 下一题 算法标签: