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