You are given an array of n distinct integers, each drawn from the range 0 to n inclusive. Since the range 0..n contains n + 1 values but the array has only n of them, exactly one value from 0..n is absent. Determine the missing value.
The missing value is unique, so the answer is uniquely determined.
Input format
Line 1: an integer n, the number of elements in the array.
Line 2: n space-separated distinct integers, each in the range 0..n. If n is such that the line would be empty it will still be present but blank.
Output format
A single integer: the value in 0..n that does not appear in the array.
Constraints
- 1 ≤ n ≤ 100000
- The
narray values are distinct and every one lies in[0, n]. - Exactly one value from
0..nis missing.