#CCBCHBAHAI0000111. Odd Gnome

Odd Gnome

Odd Gnome

Source: Kattis

Version: Phuoc Hung OJ Extended

Problem

A lineup contains IDs g1,…,gng_1,\ldots,g_n. Exactly one position pp, 2≤p≤n−12\le p\le n-1, breaks the consecutive-increasing rule. It is the first position satisfying gp≠gp−1+1g_p\ne g_{p-1}+1. Output this 1-based position. The PHOJ adaptation uses one gnome group per input file.

Input

The first line contains nn. The second line contains the nn IDs.

Output

Print the 1-based anomalous position.

Subtask

Subtask 1 (20 points): 3≤n≤103\le n\le10.

Subtask 2 (30 points): 3≤n≤1003\le n\le100.

Subtask 3 (50 points): 3≤n≤10003\le n\le1000.

Example

Input

7
10 11 12 99 13 14 15

Output

4

Explanation

g4=99g_4=99 is the first value that is not one larger than its predecessor.