#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(n);
  vector<int> ques(m);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < m; i++) cin >> ques[i];
  int i = 0, j = 0;
  while (i < n && j < m) {
    if (ques[j] >= v[i]) {
      i++;
      j++;
    } else
      j++;
  }
  cout << n - i;
}
