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

void main()
{
	auto nte = readln.chomp.split.map!(to!int);
	auto lo = nte[1] - nte[2];
	auto up = nte[1] + nte[2];
	auto san = readln.chomp.split.map!(to!int).array;
	auto res = -1;
	foreach (i, e; san) {
		auto tmp = e;
		while (tmp < lo) tmp += e;
		if (tmp <= up) {
			res = i.to!int + 1;
			break;
		} 
	}
	res.writeln;
}