import std.stdio, std.string, std.range, std.conv, std.algorithm, std.typecons;
void main(){
	alias Tuple!(int, int) Data;
	int N, M;
	auto input = readln.split.map!(to!int);
	N = input[0], M = input[1];
	int[] A = new int[N]; //?????¨
	foreach (i; 0..N) {
		A[i] = readln.chomp.to!int;
	}
	int[] vote = new int[N];
	foreach (i; 0..M) {
		int B = readln.chomp.to!int;
		foreach (j; 0..N) {
			if (A[j] <= B) {
				vote[j]++;
				break;
			}
		}
	}
	int max, idx;
	foreach (i; 0..N) {
		if (vote[i] > max) {
			max = vote[i];
			idx = i;
		}
	}
	writeln(idx+1);
}