The smallest unimaginable
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
For a given set consisting of positive integers, determine the smallest positive number, unimaginable as the sum of the elements of any subset of the set.
Input
The input file contains all the numbers that make up a given set. Each of them does not exceed 10^15, the total amount does not exceed 10000, and their sum is guaranteed to not exceed 2^64-1.
Output
In the output file to bring a single number - the answer of the problem.
Examples
Input #1
Answer #1
Submissions 702
Acceptance rate 21%