program prob2
    implicit none
    integer(8) :: n, t, a, ans, i, tmp
    integer(8), allocatable :: h(:)
    
    read(*,*) n
    read(*,*) t, a  
    allocate(h(n))
    
    read(*,*) h
    
    ans = 1
    tmp = abs(1000 * t - 6 * h(1) - 1000 * a)
    do i = 2, n
        if(tmp > abs(1000 * t - 6 * h(i) - 1000 * a)) then
            tmp = abs(1000 * t - 6 * h(i) - 1000 * a)
            ans = i
        end if
    end do 
    write(*,*) ans
    deallocate(h)    

    stop
contains
end program prob2