eolymp
bolt
Try our new interface for solving problems
Problems

Not representable number

Not representable number

Time limit 1 second
Memory limit 128 MiB

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 (1n10000), 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