Problem Statement
You are given an integer sequence $A = (A_1, A_2, \dots, A_N)$ of length $N$.
Among the integers that appear in $A$, output the integer whose number of occurrences is the minimum. However, if there are multiple such integers, output the smallest integer among them.
Input
The input is given from Standard Input in the following format:
N
A_1 A_2 ... A_N
Output
Among the integers that appear in $A$, output the integer whose number of occurrences is the minimum. However, if there are multiple such integers, output the smallest integer among them.
Sample
Sample 1
Input
3 3 4 3
Output
4
Explanation
$A$ contains $3$ two ($2$) times and $4$ one ($1$) time. Integers other than $3, 4$ do not appear. Among these, the number of occurrences of $4$ is the minimum, so output $4$.
Sample 2
Input
5 4 4 8 2 5
Output
2
Explanation
$A$ contains $2$ one ($1$) time, $4$ two ($2$) times, $5$ one ($1$) time, and $8$ one ($1$) time. Integers other than $2, 4, 5, 8$ do not appear. Among these, the integers whose number of occurrences is the minimum are $2, 5, 8$. Therefore, output $2$, which is the smallest among $2, 5, 8$.
Sample 3
Input
8 8 8 7 7 6 6 5 5
Output
5
Constraints
- $1 \le N \le 100$.
- $1 \le A_i \le 2000$ ($1 \le i \le N$).
- All input values are integers.