Let’s consider the positive whole numbers (0, 1, 2, …). For a given list of numbers l, we’ll say that the minimum excluded value (MEX) of l is the smallest nonnegative integer number that doesn’t occur in l. You are asked to write a program that given the list l, would calculate its MEX.
Input
The first line of the input contains a single integer n (1 ≤ n ≤ ) the number of elements in the list l. The next line contains n elements representing the list .
Output
The program should print the MEX of the given list.