#include<iostream>
#include<stdlib.h>
using namespace std;

int main (){
  int n, m;
  int b, count, answer;
  int *list, *result;
  list = (int*)malloc(sizeof(int)*n);
  result = (int*)malloc(sizeof(int)*n);

  cin >> n >> m;
  for(int i = 0; i<n; i++){
    cin >>list[i];
    result[i] = 0;
  }

  for(int i= 0; i< m; i++){
    count = 0;
    cin >>b;
    while(1){
      if(list[count] < b+1) break;
      count++;
    }
    //cout <<count <<endl ;
    result[count] ++;
  }
  answer = 0;
  for(int i =0; i<n; i++){
    if(result[answer] < result[i])
      answer = i ;
  }

  cout << answer + 1 <<endl;
  return 0;
}
    
    
      
      
    
  
  
#include <iostream>
#include <string>

using namespace std;

int main() {
  int n;
  cin >> n;

  for(int i = 0; i < n; i++) {
    int score = 0;
    int out = 0;

    int first = 0;
    int second = 0;
    int third = 0;

    while(1) {
      string str;
      cin >> str;
      if(str == "HIT") {
	score += third;
	third = second;
	second = first;
	first = 1;
      } else if(str == "HOMERUN") {
	score += first + second + third + 1;
	first = second = third = 0;
      } else if(str == "OUT") {
	out++;
      }

      if(out == 3) {
	cout << score << endl;
	break;
      }
    }
  }
  return 0;
}