远端评测题 2000ms 256MiB

Next Test

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

«Polygon» is a system which allows to create programming tasks in a simple and professional way. When you add a test to the problem, the corresponding form asks you for the test index. As in most cases it is clear which index the next test will have, the system suggests the default value of the index. It is calculated as the smallest positive integer which is not used as an index for some previously added test.

You are to implement this feature. Create a program which determines the default index of the next test, given the indexes of the previously added tests.

Input

The first line contains one integer n(1n3000)n (1 ≤ n ≤ 3000) — the amount of previously added tests. The second line contains n distinct integers a1,a2,...,an(1ai3000)a_1, a_2, ..., a_n (1 ≤ a_i ≤ 3000) — indexes of these tests.

Output

Output the required default value for the next test index.

Samples

3
1 7 2

3

3.26 单人训练赛 时段1

未参加
状态
已结束
规则
ACM/ICPC
题目
13
开始于
2023-3-26 13:00
结束于
2023-3-26 18:00
持续时间
5 小时
主持人
参赛人数
17