#include <bits/stdc++.h>
using namespace std;
struct node {
  int val, id;
  friend bool operator<(node a, node b) { return a.id > b.id; }
};
int main() {
  int t, m, n;
  struct node p;
  while (~scanf("%d %d", &m, &n)) {
    priority_queue<node> a;
    priority_queue<node> b;
    int id = 0;
    for (int i = 0; i < m; i++) {
      scanf("%d", &t);
      p.id = id++;
      p.val = t;
      a.push(p);
    }
    id = 0;
    ;
    for (int i = 0; i < n; i++) {
      scanf("%d", &t);
      p.id = id++;
      p.val = t;
      b.push(p);
    }
    while (!b.empty() && !a.empty()) {
      if (a.top().val <= b.top().val) {
        a.pop();
        b.pop();
      } else if (a.top().val > b.top().val) {
        a.pop();
      }
    }
    printf("%d\n", n - b.size());
  }
}
