Problems
Not representable number
Not representable number
Given n positive integers. Find the minimum positive integer that is not representable as the sum of any of these numbers. Each original number cannot be included to the sum more than once.
Input data
The first line contains the number n (1 ≤ n ≤ 10000), each of the following n lines contains one natural number if the range from 1 to 10^9
.
Output data
Print the minimum not representable number.
Examples
Input example #1
4 1 1 1 5
Output example #1
4