#include <bits/stdc++.h>
using namespace std;
long long fx[] = {-1, 1, 0, 0};
long long fy[] = {0, 0, -1, 1};
void Solution() {
  long long n, m;
  scanf("%lld %lld", &n, &m);
  long long a[n], b[m];
  for (long long i = 0; i < n; i += 1) scanf("%lld", &a[i]);
  for (long long i = 0; i < m; i += 1) scanf("%lld", &b[i]);
  long long i = 0, j = 0;
  while (j < m) {
    if (a[i] <= b[j]) {
      i++;
      j++;
    } else
      j++;
  }
  if (i == n)
    printf("0\n");
  else
    printf("%lld\n", n - i);
}
int32_t main() {
  long long tc = 1;
  for (long long tn = 1; tn < tc + 1; tn += 1) {
    Solution();
  }
  return 0;
}
