object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val _ = readLine
    val Array(tAve0, tTarget) = readLine.split(" ").map(_.toInt)
    val cand = readLine.split(" ").map(_.toInt)
    import scala.math.abs
    val tDiffWIdx = cand.map(x => abs((tAve0 * 1000) - (x * 6) - (tTarget * 1000))).zipWithIndex.sortBy(_._1)

    val ans = tDiffWIdx.head._2
    println(ans + 1)
  }
}
