#include <bits/stdc++.h>
using namespace std;
void NhapMang(istream &in, vector<int> &ArrA) {
  for (int i = 0; i < ArrA.size(); i++) {
    in >> ArrA[i];
  }
}
void XuLy(vector<int> &ArrN, vector<int> &ArrM) {
  int MinLenght = ArrN.size();
  int start = 0;
  for (int i = 0; i < MinLenght; i++) {
    bool Check = false;
    for (int j = start; j < ArrM.size(); j++) {
      if (ArrN[i] <= ArrM[j]) {
        Check = true;
        start = j + 1;
        break;
      }
    }
    if (!Check) {
      cout << ArrN.size() - i;
      return;
    }
  }
  cout << 0;
}
int main() {
  vector<int> ArrN, ArrM;
  int n, m;
  cin >> n >> m;
  ArrN.resize(n);
  ArrM.resize(m);
  NhapMang(cin, ArrN);
  NhapMang(cin, ArrM);
  XuLy(ArrN, ArrM);
  return 0;
}
