#!/usr/bin/env python3
days = int(input())
prices = list(map(int, input().split()))

todays_price = prices[0]
better_day = "infinity"

# go through all the prices and stop when find a <= one.
for i in range(1, days):
    if prices[i] <= todays_price:
        better_day = i
        break

print(better_day)