Skip to content
UPEEC

Find the Missing Number

Easy#arrays#math· solved by 0 · time limit 2.0 s

The array holds n−1n-1 distinct numbers from 11 to nn; one is missing. Find it.

Input

The count n−1n-1, then the n−1n-1 numbers.

Output

The missing number.

Constraints

2≤n≤1062 \le n \le 10^6

Sample 1

Input

7
3 7 1 2 8 4 5

Output

6

Sign in or join free to run and submit your solution.