#include <bits/stdc++.h>
using namespace std;
int a[3000], b[3000];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
  }
  int f = 0;
  int ans = n;
  for (int i = n - 1; i >= 0; i--) {
    for (int j = m - 1 - f; j >= 0; j--) {
      if (b[j] >= a[i]) {
        ans--;
        f++;
        break;
      }
    }
  }
  printf("%d", ans);
  return 0;
}
