#include <bits/stdc++.h>
using namespace std;
int a[3333], b[3333];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = (0); i <= (int(n) - 1); ++i) scanf("%d", &a[i]);
  for (int j = (0); j <= (int(m) - 1); ++j) scanf("%d", &b[j]);
  sort(a, a + n);
  sort(b, b + m);
  int pos = 0, res = 0;
  for (int i = (0); i <= (int(n) - 1); ++i) {
    while (pos < m && a[i] > b[pos]) pos++;
    if (pos >= m)
      res++;
    else
      pos++;
  }
  printf("%d\n", res);
  return 0;
}
