The sequence ofnpositive integers is given. Determines whether the sequence is a permutation of the firstnnatural numbers.
One line specifies the numbern (n ≤ 10000) and n positive integers separated by space. It is known that each positive integer is less than2000000.
Print0, if the sequence is a permutation. Otherwise print the minimum number that is not in the sequence.
3 2 1 3
3 1 4 2