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

best = 99999999999
result = -1

n.times do |i|
  temp = t * 1000 - h[i] * 6
  if (a * 1000 - temp).abs < best
    best = (a * 1000 - temp).abs
    result = i + 1
  end
end

puts result
