object Main extends App {
  val line = io.Source.stdin.getLines.toIndexedSeq.tail
  .map(_.split(' ').map(_.toInt).toArray)
  val T=line(0)(0)
  val A=line(0)(1)*1000
  //println(T,A)
  val H=line(1)
  val temps=H.map(h => T*1000 - h*6).toIndexedSeq
  //println(temps)
  
  var closest=Int.MaxValue
  var index=0
  var i=0
  temps.foreach{t =>
    val abs = Math.abs(t-A)
    if( abs < closest){
      closest = abs
      index = i
    }
    i+=1
  }
  println(index+1)
}
	