An array has n + 1 integers, each in the range 1..n. Exactly one value is repeated (it may appear two or more times) and it is the only repeated value. Find that repeated value.
Input format
Line 1: an integer m, the length of the array (equal to n + 1).
Line 2: m space-separated integers, each between 1 and m - 1.
Output format
One line: the repeated value.
Constraints
- 2 <= m <= 100000
- Each value is in 1..m-1 and exactly one value repeats.