eolymp
bolt
Try our new interface for solving problems
Problems

The smallest unimaginable

The smallest unimaginable

Time limit 1 second
Memory limit 64 MiB

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 data

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 data

In the output file to bring a single number - the answer of the problem.

Examples

Input example #1
1 7 2 5 423456
Output example #1
4