Start: 2023-09-24 09:00:00

0923日常周赛

End: 2023-09-30 08:55:00
Now  2026-03-21 09:32:08  类型: IOI  状态: Ended 

P2. MissingNo
Description

Naohiro had N+1 consecutive integers, one of each, but he lost one of them.

The remaining N integers are given in arbitrary order as A1 ,…,AN. Find the lost integer.

The given input guarantees that the lost integer is uniquely determined.

给定一个长度为 n 的**乱序**序列 a。但是,这个序列中有一个数字消失了。如果加上这个数字,那么序列就是一段连续的数字。

请找出这个消失的数字。


Input

The input is given from Standard Input in the following format:

N

A1 A2… AN



Output



Print the answer.




Examples

Input

3
2 3 5

Output

4

Input

8
3 1 4 5 9 2 6 8

Output

7

Input

16
152 153 154 147 148 149 158 159 160 155 156 157 144 145 146 150

Output

151
Hint

Constraints

2≤N≤100

1≤Ai≤1000

All input values are integers.

The lost integer is uniquely determined.


Submit

题目参数
Time Limit 1 second
Memory Limit 128 MB
Submit