#include <bits/stdc++.h>
 
using namespace std;

int N, M, A[1111], B[1111], V[1111];
 
int main()
{
    cin >> N >> M;
 
    for (int i = 1; i <= N; i++)
        cin >> A[i];
 
    for (int i = 1; i <= M; i++)
        cin >> B[i];
 
    for (int i = 1; i <= M; i++)
    {
        for (int j = 1; i <= N; j++)
        {
            if (A[j] <= B[i])
            {
                V[j]++;
 
                break;
            }
        }
    }
 
    cout << distance(V, max_element(V, V + N)) << endl;
 
    return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main() {
  int N, M; cin >> N >> M;
  vector<int> cost(N);
  for(int i = 0; i < N; ++i)
    cin >> cost[i];
  vector<int> score(N, 0);
  while(M--) {
    int x; cin >> x;
    for(int i = 0; i < N; ++i) {
      if(cost[i] <= x) {
        score[i]++;
        break;
      }
    }
  }
  int argmax = find(score.begin(), score.end(), *max_element(score.begin(), score.end())) - score.begin();
  cout << argmax + 1 << endl;
}