Question

MEX

8

0 3 2 6 2 1 0 0

4

3

2000 2000 2000

0

You are given a sequence of length N consisting of integers:

A=(A

Find the smallest non-negative integer not in (A

A=(A

_{1}, A_{2},...., A_{N})Find the smallest non-negative integer not in (A

_{1}, A_{2},....,A_{N}).Input

The input contains N and elements of sequence separated by a new line.

N

A

1≤N≤2000

0≤Ai≤2000

All values in the input are integers.

N

A

_{1}, A_{2},. , A_{N}**Constraints**1≤N≤2000

0≤Ai≤2000

All values in the input are integers.

Output

Print the answer.

Example

**Sample Input 1**

8

0 3 2 6 2 1 0 0

**Sample Output 1**

4

**Sample Input 2**

3

2000 2000 2000

**Sample Output 2**

0