implicit none
integer :: n
integer,allocatable :: h(:)
integer :: i,mi,a,t,m

read *,n
read *,t,a
allocate(h(n))
read *,(h(i),i=1,n)

a = a * 1000
t = t * 1000

m = abs(a - (t - h(1) * 6))
mi = 1
do i = 2, n
   if (abs(a - (t - h(i) * 6)) < m) mi = i
enddo

print '(i0)',mi
end