#abc245b. [abc245_b]Mex

[abc245_b]Mex

Problem Statement

You are given a sequence of length NN consisting of integers: A=(A1,ldots,AN)A=(A_1,\\ldots,A_N).

Find the smallest non-negative integer not in (A1,ldots,AN)(A_1,\\ldots,A_N).

Constraints

  • 1leqNleq20001 \\leq N \\leq 2000
  • 0leqAileq20000 \\leq A_i \\leq 2000
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN A1A_1 ldots\\ldots ANA_N

Output

Print the answer.


Sample Input 1

8
0 3 2 6 2 1 0 0

Sample Output 1

4

The non-negative integers are 0,1,2,3,4,ldots0,1,2,3,4,\\ldots.
We have 0,1,2,30,1,2,3 in AA, but not 44, so the answer is 44.


Sample Input 2

3
2000 2000 2000

Sample Output 2

0