atcoder#ABC245B. [ABC245B] Mex
[ABC245B] Mex
Score : points
Problem Statement
You are given a sequence of length consisting of integers: .
Find the smallest non-negative integer not in .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
8
0 3 2 6 2 1 0 0
4
The non-negative integers are . We have in , but not , so the answer is .
3
2000 2000 2000
0