n = gets.to_i
t, a = gets.split.map(&:to_i)
h = gets.split.map(&:to_i)

ans = 0
ccc = 1000000000000

(0..(n - 1)).each do |i|
  curr = i + 1
  temp = (t - h[i] * 6)
  ci = (a - temp).abs
  if ci < ccc
    ccc = ci
    ans = curr
  end
end
puts ans