import std.stdio;
import std.c.stdio;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;

void main() {
    int N, M; readf("%d %d\n", &N, &M);
    int[] A = new int[N];
    int[] c = new int[N];
    foreach (i; 0 .. N) {
        readf("%d\n", &A[i]);
    }
    foreach (i; 0 .. M) {
        int b; readf("%d\n", &b);
        foreach (j; 0 .. N) {
            if (A[j] <= b) {
                c[j]++;
                break;
            }
        }
    }
    int a = c.reduce!max;
    foreach (i; 0 .. N) {
        if (c[i] == a) {
            writeln(i + 1);
            break;
        }
    }
}