program palace
  implicit none
  integer              :: n, t, a, i, idx
  integer, allocatable :: h(:)
  real(8), parameter   :: coeff = 0.006d0
  real(8)              :: tmp, val
  read(*,*) n
  allocate(h(n))
  read(*,*) t, a
  read(*,*) h(:)
  idx = 1
  val = 1.0e8
  do i = 1, n
     tmp = abs(a - (t - coeff*h(i)))
     if (tmp .lt. val) then
        idx = i
        val = tmp
     end if
  end do
  deallocate(h)
  write(*,'(i0)') idx
  stop
end program palace