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