medidas = int(input())
rpm = list(map(int, input().split()))
queda = 0
for i in range(1, len(rpm)):
    if rpm[i] < rpm[i - 1]:
        queda = rpm.index(rpm[i]) + 1
        break
if queda != 0:
    print(queda)
else:
    print(queda)

8b122cd8cb997a964c1011061ced99b9c92b4345
<mask token>

<mask token>
for i in range(1, len(rpm)):
    if rpm[i] < rpm[i - 1]:
        queda = rpm.index(rpm[i]) + 1
        break
if queda != 0:
    print(queda)
else:
    print(queda)

medidas = int(input())
rpm = list(map(int, input().split()))
queda = 0
for i in range(1, len(rpm)):
    if rpm[i] < rpm[i - 1]:
        queda = rpm.index(rpm[i]) + 1
        break
if queda != 0:
    print(queda)
else:
    print(queda)
