#include <bits/stdc++.h>
using namespace std;
int a[3010];
int b[3010];
int main(int argc, char* argv[]) {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  map<int, int> bb;
  for (int i = 0; i < m; i++) {
    int b;
    cin >> b;
    bb[b]++;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    map<int, int>::iterator it = bb.lower_bound(a[i]);
    if (it == bb.end()) {
      cout << (n - i) << endl;
      return 0;
    } else {
      bb[a[i]]++;
      if (0 == --it->second) bb.erase(it);
    }
  }
  cout << 0 << endl;
  return 0;
}
