implicit none
integer:: n, i, j, a, b, ans, t
integer,allocatable,dimension(:):: p

read(5,*) n, a, b
allocate(p(n))
read(5,*) (p(i),i=1,n)

ans = 1
t = abs( (1000 * b) - (1000 * a) + (6 * p(1)) )

do i = 1, n
    if ( t > abs( (1000 * b) - (1000 * a) + (6 * p(i)) ) ) then
        ans = i
        t = abs( (1000 * b) - (1000 * a) + (6 * p(i)) )
    endif
enddo
    
write(6, *) ans

end