import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void main() {
    int n = readint;
    auto ta = readints;
    int t = ta[0], a = ta[1];
    auto hs = readints;

    int best = int.max;
    int ans = -1;
    for (int i = 0; i < hs.length; i++) {
        int s = t * 1000 - hs[i] * 6;
        // writeln(s);
        if (abs(s - a * 1000) < best) {
            best = abs(s - a * 1000);
            ans = i + 1;
        }
    }
    writeln(ans);
}
