MEX#5880

MEX

1 segundo
128 megabytes
Muy fácil

A club has 10^5 members, each assigned a unique number from to 10^5 - 1. The smaller the number, the higher the participant's skill in club competitions. However, members are absent.

Now, the club organizer wants to find the most skilled member who is still present in the club (that is, the member with the smallest number who is not absent).

Entrada

The first line contains the number of absent members (1 \leq n < 10^5). The second line lists their numbers — all numbers are less than 10^5.

Salida

Print one number — the number of the most skilled present club member.

Ejemplos

Ejemplo 1

Loading
Loading