The sum $s$ of the original $n$ integers is given, along with $n-1$ of them. Print the missing integer.
Input
First line $n$ and $s$; then $n-1$ integers, each in $[0, 1000]$, one per line ($2 \le n \le 1000$).
Output
Print the missing integer, $s$ minus the sum of the given numbers.
Example 1
Input
5 30 3 7 8 10
Output
2
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.