#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> x, y;
  int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    x.push_back(a);
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    y.push_back(a);
  }
  int j = 0;
  for (int i = 0; i < y.size(); i++) {
    if (x[j] <= y[i]) j++;
    if (j == n) break;
  }
  cout << n - j << endl;
}
