Jack has $N$ coins, with values $M_1$, $M_2$, \dots, $M_N$. Find the smallest positive amount that cannot be paid with these coins with no change.
The first line contains $N$ ($1 \le N \le 1\,000$), the number of coins. The second line contains $N$ integers $M_i$ ($1 \le M_i \le 1\,000\,000$), the values of the coins.
The only line should contain a single positive integer: the smallest amount that Jack cannot pay with his coins.