In distant future on Earth day lasts for n hours and that's why there are n timezones. Local times in adjacent timezones differ by one hour. For describing local time, hours numbers from 1 to n are used, i.e. there is no time "0 hours", instead of it "n hours" is used. When local time in the 1-st timezone is 1 hour, local time in the i-th timezone is i hours.

Some online programming contests platform wants to conduct a contest that lasts for an hour in such a way that its beginning coincides with beginning of some hour (in all time zones). The platform knows, that there are a_{i} people from i-th timezone who want to participate in the contest. Each person will participate if and only if the contest starts no earlier than s hours 00 minutes local time and ends not later than f hours 00 minutes local time. Values s and f are equal for all time zones. If the contest starts at f hours 00 minutes local time, the person won't participate in it.

Help platform select such an hour, that the number of people who will participate in the contest is maximum. 


-----Input-----

The first line contains a single integer n (2 ≤ n ≤ 100 000) — the number of hours in day.

The second line contains n space-separated integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10 000), where a_{i} is the number of people in the i-th timezone who want to participate in the contest.

The third line contains two space-separated integers s and f (1 ≤ s < f ≤ n).


-----Output-----

Output a single integer — the time of the beginning of the contest (in the first timezone local time), such that the number of participants will be maximum possible. If there are many answers, output the smallest among them.


-----Examples-----
Input
3
1 2 3
1 3

Output
3

Input
5
1 2 3 4 1
1 3

Output
4



-----Note-----

In the first example, it's optimal to start competition at 3 hours (in first timezone). In this case, it will be 1 hour in the second timezone and 2 hours in the third timezone. Only one person from the first timezone won't participate.

In second example only people from the third and the fourth timezones will participate.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
a = [int(i) for i in input().split()]
s, f = [int(i) for i in input().split()]
a = a + a
ln = f - s
ans = sum(a[:ln])
mx = ans
h = s
for i in range(n - 1):
    ans = ans - a[i] + a[i + ln]
    if ans > mx:
        ans = mx
        k = s + (n - (i + 2) + 1)
        if k > n:
            k -= n  
        h = k
    elif ans == mx:
        k = s + (n - (i + 2) + 1)
        if k > n:
            k -= n    
        h = min(h, k)
print(h)


import sys, math

#f = open('input/input_1', 'r')
f = sys.stdin

N = int(f.readline())
a = list(map(int, f.readline().split()))
start, end = list(map(int, f.readline().split()))

time_len = end-start
sum_p = 0
max_sum = -1
max_sum_end = 10000000
for i in range(N*2):
  if i >= time_len:
    sum_p -= a[(i-time_len)%N]
  sum_p += a[i % N]
  ans = (2*N + end - i - 1) % N
  if ans == 0:
    ans = N
  if i >= time_len-1 and \
    (max_sum < sum_p or (max_sum == sum_p and max_sum_end > ans)):
    max_sum = sum_p
    max_sum_end = ans

print(max_sum_end)

'''
5
10 2 3 4 10
1 5

1 2 3 4 5
4 5 1 2 3
'''


n = int(input())
L = list(map(int, input().split()))
s, f = list(map(int, input().split()))
count = 0
count_max = 0
ans = 0
for i in range(s - 1, f - 1):
    count += L[i]
for i in range(n):
    count -= L[f - 1]
    s -= 1
    f -= 1
    if s == -1:
        s = n - 1
    if f == -1:
        f = n - 1
    count += L[s]
    if count > count_max:
        count_max = count
        ans = i
print(ans + 1) 


R = lambda : map(int, input().split())

n = int(input())
a = list(R())
s,f = R()

d = f-s

def solve(a,d,n,s):
    if (n < d + 1):
        return s

    t = 0
    for i in range(0, d):
        t += a[i]

    m = t
    res = s
    for i in range(1, n):
        t += a[(i + d - 1) % n] - a[i - 1]
        if t > m:
            m = t
            res = gr(i,s,n)
        elif t == m:
            res = min(res, gr(i,s,n))
    
    return res
    

def gr(i,s,n):
    res = (s-i) % n
    if (res <= 0):
        return n-res
    return res

print(solve(a,d,n,s))

#This code sucks, you know it and I know it.  
#Move on and call me an idiot later.

def ps(l, i, j):
    if i > j:
        return l[-1]-l[i-1] + l[j]
    if i==0:
        return l[j]
    else:
        return l[j]-l[i-1]

n =  int(input())
a = list(map(int, input().split()))
s, f = map(int, input().split())

l = [a[0]]
for i in a[1:]:
    l.append(l[-1]+i)
x = s-1
y = f-2
ans = 0
tm = 0
for i in range(n):
    temp = ps(l, x, y)
    if temp > ans:
        tm = i+1
        ans = temp 
    x -= 1
    y -= 1
    if x < 0:
        x = n-1
    if y < 0:
        y = n-1
print(tm)

n = int(input())
arr = list(map(int, input().split()))
s, f = list(map(int, input().split()))

num = 0
for i in range(s - 1, f - 1):
	num += arr[i]

t = 0
current = num
for time in range(n):
	current = current - arr[(s - 1 + time) % n] + arr[(f - 1 + time) % n]
	if (current >= num):
		num = current
		t = time

print(n - t)


# C

import copy

N = int(input())
A = list(map(int, input().split()))
s, f = list(map(int, input().split()))

B = copy.deepcopy(A)
C = A + B  # Aを二つ連結したリスト

l = f - s
max_list = []
max_number = 0

sumC = [0 for i in range(N)]

sumC[0] = sum(C[0:l])
for i in range(1, N):
    sumC[i] = sumC[i-1] + C[i+l-1] - C[i-1]

for i in range(N):
    if sumC[i] > max_number:
        max_list = [i]
        max_number = sumC[i]
    elif sumC[i] == max_number:
        max_list.append(i)

ans_list = []
for j in max_list:
    for i in range(N):
        if j + i < N:
            if s + i <= N:
                A[j + i] = s + i
            else:
                A[j + i] = s + i - N
        else:
            if s + i <= N:
                A[j + i - N] = s + i
            else:
                A[j + i - N] = s + i - N
    ans_list.append(A[0])

print(min(ans_list))


n = int(input())
a = [int(i) for i in input().split()]
s, f = map(int, input().split())
s -= 1
f -= 2
pref = [0] * n
pref[0] = a[0]
for i in range(1, n):
	pref[i] = pref[i - 1] + a[i]
mx = -1
ans = 0
for hour in range(n):
	left = s - hour
	right = f - hour
	if left < 0:
		left += n
	if right < 0:
		right += n
	res = -1
	if left <= right:
		res = pref[right] - (pref[left - 1] if left > 0 else 0)
	else:
		res = pref[n - 1] - (pref[left - 1] if left > 0 else 0) + pref[right]
	if res > mx:
		mx = res
		ans = hour + 1
print(ans)

n = int(input())
a = list(map(int, input().split()))
s, f = list(map(int, input().split()))

d = f-s
msum = 0
minx = 10**6
temp = a+a[:d+1]
sumt=0

for x in range(n + d + 1):
    sumt+=temp[x]
    if (x >= d):
        sumt-= temp[x-d]
    #print(sumt, (n - x + s + d- 2)%n + 1, x)
    if (sumt > msum):
        minx = 10**6
        msum = sumt
        minx = min(minx, (n-x+s+d - 2)%n + 1)
    elif (sumt == msum):
        minx = min(minx, (n-x+s+d - 2)%n + 1)
print(minx)


n = int(input())

A = list(map(int, input().split()))

s, f = list(map(int, input().split()))

s -= 1
f -= 1

m = int(1e+9)

best_sum = sum(A[s: f + 1])
cur_sum = best_sum
best_i = 0

for i in range(1, n):
    cur_sum += A[(s - i + n) % n]
    cur_sum -= A[(f - i + n) % n]
    if cur_sum > best_sum:
        best_sum = cur_sum
        best_i = i

print(best_i + 1)


n = int(input())
a = list(map(int, input().split()))
s, f = map(int, input().split())
s -= 1
f -= 1
best_sum = sum(a[s:f + 1])
best_i = 0
cur_sum = best_sum
for i in range(1, n):
    cur_sum += a[(s - i + n) % n]
    cur_sum -= a[(f - i + n) % n]
    if cur_sum > best_sum:
        best_sum = cur_sum
        best_i = i
print(best_i + 1)

n = int(input())
a = [0]
b =input().split()
a = a+b
ans  = 0
m = 0
for i in range(1,n+1):
    a[i] = int(a[i])
s,f = input().split()
s = int(s)
f = int(f)
for i in range(s,f):
    m+=a[i]
ma = m
ans = 1
start = s-1
count = f-1
if count<1:
    count = n
if start<1:
    start = n
for i in range(2,n+1):
    m = m-a[count] + a[start]
    count = count-1
    start = start - 1
    if count==0:
        count = n
    if start==0:
        start = start=n
    if m>ma:
        ma = m
        ans = i
print(ans) 

n = int(input())
a = list(map(int, input().split()))
s, f = map(int, input().split())
s -= 1
f -= 1
best_sum = sum(a[s:f])
best_i = 0
cur_sum = best_sum
for i in range(1, n):
    cur_sum += a[(s - i + n) % n]
    cur_sum -= a[(f - i + n) % n]
    if cur_sum > best_sum:
        best_sum = cur_sum
        best_i = i
print(best_i + 1)

n = int(input())
A = [int(x) for x in input().split()]
A = A+A
s,f = list(map(int,input().split()))

l = f-s
S = sum(A[:l])
mi = 0
mS = S
ans = (s-1-mi)%n + 1
for i in range(n-1):
    S = S + A[i+l] - A[i] 
    if mS == S:
        mi = i+1
        ans = min(ans, (s-1-mi)%n + 1) # Update min
    if mS < S:
        mS = S
        mi = i+1
        ans = (s-1-mi)%n + 1 # Set min
print(ans)


#import sys
#sys.stdin = open ('464-C.in', 'r')

n = int(input())
n = n*2
a = list(map(int,input().split()))
a = a+a
s, f = list(map(int, input().split()))
sum = [0 for i in range(n+1)]
for i in range(1,n+1):
    sum[i] = sum[i-1]+a[i-1]
ran = f-s
msum, idx = 0, 0
bb = int(1e18)
for i in range(ran,n+1):
   # print (i, " = ", sum[i]-sum[i-ran])
    if sum[i]-sum[i-ran] > msum:
        msum = sum[i] - sum[i - ran]
        idx = i-ran+1
        if idx < s:
            idx = s - idx + 1
        elif idx > s:
            idx = 1 - abs(s - idx)
            idx += n
        else:
            idx = 1
        idx = idx % (int(n / 2))
        if (idx == 0):
            idx = int(n / 2)
        bb = idx
    elif sum[i]-sum[i-ran] == msum:
        idx = i - ran + 1
        if idx < s:
            idx = s - idx + 1
        elif idx > s:
            idx = 1 - abs(s - idx)
            idx += n
        else:
            idx = 1
        idx = idx % (int(n / 2))
        if (idx == 0):
            idx = int(n / 2)
        if idx < bb:
            bb = idx
            msum = sum[i] - sum[i - ran]


#print (msum, " ", idx)

print (bb)

n = int(input())
a = [int(x) for x in input().split()]
s,f = [int(x) for x in input().split()]
zones = f-s
currans = 1
currmax = sum(a[s-1 : f-2])
ans=1
maxppl = currmax
fst = s-1
lst = f-2
for currans in range(2, n+1):
    currmax += a[fst-1 if fst > 0 else n-1]
    currmax -= a[lst]
    fst = fst-1 if fst > 0 else n-1
    lst = lst - 1 if lst > 0 else n - 1
    if currmax > maxppl:
        maxppl = currmax
        ans = currans
print(ans)


n=int(input())
a=[int(i) for i in input().split()]
s,f=(int(i) for i in input().split())
pref=[a[0]]
for i in range(1,n):
	pref.append(a[i]+pref[i-1])
	
def nb_people(strt, end):
	if strt<=end:
		if strt==0:
			return pref[end]
		else:
			return pref[end]-pref[strt-1]
	else:
		ret = pref[end]+pref[n-1]
		if strt>0:
			ret-=pref[strt-1]
		return ret
	
max_people=0
opt_h=0
for h in range(1,n+1):
	strt=s-h+1#à h heures ds le 1er fuseau où est - il s heures ?
	if strt<=0:
		strt+=n
	end =f-h#pareil avec f-1
	if end<=0:
		end+=n
	tmp_people = nb_people(strt-1, end-1)
	#print("h",h,"strt", strt, "end", end,"tmp_people",tmp_people)
	if tmp_people>max_people:
		max_people=tmp_people
		opt_h = h
print(opt_h)


from sys import stdin as si
from collections import Counter as c


class Solution:

    def bazinga(self, n,m, k):
        mnp = sum(m[k[0]-1:k[1]-1])    # min number of participants
        diff = k[1]-k[0]
        mxp,ans = mnp, 0              # maximizing participants
        for i in range(1,n):
            # print (i,diff, mxp,mnp, sum(m[i: diff+i]))
            mxp +=  m[(k[0]-i-1 + n) % n]
            mxp -= m[(k[1]-i-1 + n) % n]
            if mxp > mnp:
                mnp,ans = mxp, i
        return ans +1


def __starting_point():
    #for i in range(int(si.readline().strip())):
    n = int(si.readline().strip())
    m = list(map(int, si.readline().strip().split()))
    k = tuple(map(int, si.readline().strip().split()))
    S = Solution()
    print(S.bazinga(n, m, k))



'''
http://codeforces.com/contest/939/problem/C
'''
__starting_point()

n = int(input())
a = [0] + list(map(int, input().split()))
s, f = list(map(int, input().split()))

w = f - s
max_s = cur_s = sum(a[s:f])
max_h = cur_h = s

for i in range(2, n+1):
	cur_h -= 1
	if cur_h == 0: 
		cur_h = n
	j = i + w - 1
	if j > n:
		j -= n
	cur_s = cur_s - a[i-1] + a[j]
	if (cur_s > max_s) or (cur_s == max_s and cur_h < max_h):
		max_s = cur_s
		max_h = cur_h
		
print(max_h)
	
	


def main():
    n = int(input())

    a = [int(x) for x in input().split()]
    a += a

    s, f = [int(x) for x in input().split()]

    dp = [0 for _ in range(2 * n + 1)]
    for i in range(2 * n):
        dp[i + 1] = dp[i] + a[i]

    ans, sum = 0, 0

    for i in range(n):
        cur_sum = dp[f + n - i - 1] - dp[s + n - i - 1]

        if cur_sum > sum:
            ans = i
            sum = cur_sum

    ans += 1
    print(ans)        


def __starting_point():
    main()

__starting_point()

n = int(input())
ps = [ int(a) for a in input().split() ]
s,f = [ int(a) for a in input().split() ]

window = f-s
ps += ps[:window]

def f(x):
    return (s-1-x)%n + 1

answers = []
c = m = sum(ps[:window])
for i in range(n):
    if c > m:
        answers = [f(i)]
        m = c
    elif c == m:
        answers += [f(i)]
    c += ps[i+window]-ps[i]

print(min(answers))

h = int(input())
ppl = [int(x) for x in input().split()]
sl = [int(x) for x in input().split()]
n = sl[1] - sl[0] if sl[1] > sl[0] else sl[1] - sl[0] + h
m = 0
index = 0
temp = sum(ppl[0:n])
ans = []
for i in range(h):
    if m < temp:
        m = temp 
        ans.clear()
        ans.append(i)
    elif m == temp:
        ans.append(i)
    temp -= ppl[i]
    temp += ppl[(i+n) % h]
res = [(sl[0] + h - index - 1) % h + 1  for index in ans]
# print(n)
# print(m)
print(min(res))

    


# Q.C
n = int(input())
a = input().split(" ")
a = list(map(int,a))
s,f = list(map(int, input().split(" ")))
a.insert(0,0)

x = 1
xm = x
li = s-x+1
ri = f-x
totalm = sum(a[i] for i in range(li,ri+1))
total = totalm

for x in range(2, n+1):
    li -= 1
    if li == 0:
        li = n
    total += a[li]
    total -= a[ri]
    ri -= 1
    if ri == 0:
        ri = n
    if total > totalm:
        totalm = total
        xm = x
print(xm)

n = int(input())

inp = input().split(" ")

people = []
for i in range(n):
	people.append(int(inp[i]))

inp = input().split(" ")
start = int(inp[0])
end = int(inp[1])
diff = end - start

optimal = 1
people = people + people
m = sum(people[0: diff])
prev_sum = m

for i in range(1, n):
	offset = min(diff, n - i)
	prev_sum -= people[i - 1]
	prev_sum += people[i + diff - 1]

	if prev_sum > m:
		m = prev_sum
		optimal = i + diff
		optimal = (end - optimal) % n
		if optimal == 0:
			optimal = n
			
	if prev_sum == m:
		optimal2 = i + diff
		optimal2 = (end - optimal2) % n
		if optimal2 == 0:
			optimal2 = n

		if optimal2 < optimal:
			optimal = optimal2

if m == 0:
	optimal = 1

print(optimal)