#P1017. 缺失的数字 (Missing Number)

缺失的数字 (Missing Number)

Source: CSES Problem Set (Task 1083)
Link: https://cses.fi/problemset/task/1083
Category: Introductory Problems

  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given all numbers between 1,2,…,n1,2,\ldots,n except one. Your task is to find the missing number.

Input

The first input line contains an integer nn.

The second line contains n−1n-1 numbers. Each number is distinct and between 11 and nn (inclusive).

Output

Print the missing number.

Constraints

  • 2≤n≤2⋅1052 \le n \le 2 \cdot 10^5

Example

Input:

5
2 3 1 5

Output:

4