
let N = Int(readLine()!)!
let a = readLine()!.split(separator: " ").map({Int($0)!})
let T = a[0]
let A = a[1]

let H_line = readLine()!.split(separator: " ").map({abs(T*1000 - 1000*A - Int($0)! * 6)})
print(H_line.firstIndex(of: H_line.min()!)! + 1)