var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line',function(line) {
  lines.push(line);
});
reader.on('close',function() {
  'use strict';
  var cmp = lines[0].split(' ');
  var n = Number(cmp[0]);
  var m = Number(cmp[1]);
  var list = [];
  var standard = [];
  var evaluation = [];

  for (let i = 1; i < n+1; i++) {
    list.push( Number(lines[i]) );
  }
  for (let i = n+1; i < n+m+1; i++) {
    standard.push( Number(lines[i]) );
  }
  for (let i = 0, len = list.length; i < len; i++) {
    evaluation.push(0);
  }
  for (let i = 0, len = standard.length; i < len; i++) {
    for (let j = 0, len_ = list.length; j < len_; j++) {
      if (standard[i] >= list[j]) {
        evaluation[j]++;
        break;
      }
    }
  }
  var ans = 0;
  for (let i = 0, len = evaluation.length; i < len; i++) {
    ans = Math.max(ans, evaluation[i]);
  }
  for (let i = 0, len = evaluation.length; i < len; i++) {
    if (evaluation[i] == ans) {
      console.log(i+1);
      break;
    }
  }
});

