'use strict'
function Main(input) {
  const ar = input.split("\n").map(x => x.split(" "));
  const N = ar[0][0];
  const [T, A] = ar[1];
  const H = ar[2];
 
  const a = [];
 
  for (let i = 0; i < H.length; i++) {
    a.push([i, Math.abs(T * 1000 - H[i] * 6 - A * 1000)]);
  }
 
  console.log(a.reduce((x, y) => x[1] < y[1] ? x : y)[0] + 1);
 
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));