human
Allen wants to enter a fan zone that occupies a round square and has n entrances.

There already is a queue of a_i people in front of the i-th entrance. Each entrance allows one person from its queue to enter the fan zone in one minute.

Allen uses the following strategy to enter the fan zone: 

  * Initially he stands in the end of the queue in front of the first entrance. 
  * Each minute, if he is not allowed into the fan zone during the minute (meaning he is not the first in the queue), he leaves the current queue and stands in the end of the queue of the next entrance (or the first entrance if he leaves the last entrance). 


Determine the entrance through which Allen will finally enter the fan zone.

Input

The first line contains a single integer n (2 ≤ n ≤ 10^5) — the number of entrances.

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 10^9) — the number of people in queues. These numbers do not include Allen.

Output

Print a single integer — the number of entrance that Allen will use.

Examples

Input

4
2 3 2 0

Output

3

Input

2
10 10

Output

1

Input

6
5 2 6 5 7 4

Output

6

Note

In the first example the number of people (not including Allen) changes as follows: [2, 3, 2, 0] → [1, 2, 1, 0] → [0, 1, 0, 0]. The number in bold is the queue Alles stands in. We see that he will enter the fan zone through the third entrance.

In the second example the number of people (not including Allen) changes as follows: [10, 10] → [9, 9] → [8, 8] → [7, 7] → [6, 6] → \\\ [5, 5] → [4, 4] → [3, 3] → [2, 2] → [1, 1] → [0, 0].

In the third example the number of people (not including Allen) changes as follows: [5, 2, 6, 5, 7, 4] → [4, 1, 5, 4, 6, 3] → [3, 0, 4, 3, 5, 2] → \\\ [2, 0, 3, 2, 4, 1] → [1, 0, 2, 1, 3, 0] → [0, 0, 1, 0, 2, 0].
Solve the task in PYTHON3.
 What is a Python program to determine the entrance through which Allen will finally enter the fan zone?
assistant
#Here is Python program to determine the entrance through which Allen will finally enter the fan zone.

####### Q1 #######

# x = input().split(' ')
# x1, x2 = int(x[0]), int(x[1])
#
# if x1 == x2:
#     print('Saal Noo Mobarak!')
# elif x1 - x2 < 0:
#     print('R' * (x2-x1))
# else:
#     print('L' * (x1 - x2))

####### Q2 #######

# n = int(input())
# Xs = []
# for j in range(n):
#     Xs.append(input())
#
#
# def check(num):
#     c, f = False, False
#
#     for i in num:
#         if num.count(i) >= 4:
#             f = True
#             break
#
#     for i in range(6):
#         if int(num[i]) == int(num[i + 1]) and int(num[i + 1]) == int(num[i + 2]):
#             c = True
#             break
#
#     if num == num[::-1] or f or c:
#         return "Ronde!"
#     else:
#         return 'Rond Nist'
#
#
# for i in Xs:
#     print(check(i))

######## Q3 ########
# import math
#
# n, x, y = input().split(' ')
# n, x, y = int(n), int(x), int(y)
#
# charges = input().split(' ')
# hundreds = [100 for i in range(n-1)]
#
# for i in range(len(charges)):
#     charges[i] = int(charges[i])
#
# charges = sorted(charges)
#
# steps = [math.ceil((hundreds[i-1] - charges[i])/y) for i in range(1, n)]
#
# Min = min(charges)
#
#
# if Min//x < sum(steps):
#     print('NO')
# else:
#     print('YES')

# def minimumCoinsNeeded(coins, cash):
#
#     dp = [0] * (cash + 1)
#
#     for i in range(1, cash + 1):
#         for coin in coins:
#             if i - coin >= 0:
#                 if dp[i] == 0:
#                     dp[i] = dp[i - coin] + 1
#                 else:
#                     dp[i] = min(dp[i], dp[i - coin] + 1)
#
#     return dp[cash]
#
#
# coins = [1, 5, 10, 20, 100]
# print(minimumCoinsNeeded(coins, 1000000000))

#########################################################################
###### World Cup ###### A problem from CodeForces ###### Wordl Cup ######
def func(As, n, entranceNum=0):

    Min = min(As)
    p = entranceNum

    while True:
        if As[p] == 0:
            return p+1

        if p != n-1:
            for i in range(p + 1, n):  # checking the right side of position p in As for possible...