import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val _ = in.readLine().toInt
    val Array(t, a) = in.readLine().split("\\s+").map(_.toInt)
    val hs = in.readLine().split("\\s+").map(_.toInt)

    val tm = t * 1000
    val am = a * 1000
    out.println(hs.map(h => Math.abs(tm - h * 6 - am)).zipWithIndex.minBy(_._1)._2 + 1)

    out.flush()
  }
}
