#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, i, rs = 0;
  map<int, int> aa;
  map<int, int> bb;
  map<int, int>::iterator it;
  bool buy;
  cin >> n >> m;
  int a[n], b[m];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    aa[a[i]]++;
  }
  for (i = 0; i < m; i++) {
    cin >> b[i];
    bb[b[i]]++;
  }
  for (i = 0; i < n; i++) {
    if (bb[a[i]] > 0) {
      bb[a[i]]--;
    } else {
      buy = false;
      for (it = bb.begin(); it != bb.end(); it++) {
        if (it->first > a[i] && it->second > 0) {
          buy = true;
          it->second--;
          break;
        }
      }
      if (!buy) rs++;
    }
  }
  cout << rs;
  return 0;
}
