LearnPy Hub
← Arena
IntermediateRating 1300

Smallest Missing Positive

Print the smallest positive integer that is not in the list.

Input

n, then n integers.

Output

One integer.

Sample 1

Input
3
1 2 0
Output
3

Sample 2

Input
4
3 4 -1 1
Output
2
solution.py
Output appears here
Smallest Missing Positive · Python Arena problem · LearnPy Hub