#include <bits/stdc++.h>
int main() {
  int n, m, i, j, arr[3001], brr[3001], temp, count = 0;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  for (i = 0; i < m; i++) {
    scanf("%d", &brr[i]);
  }
  j = 0;
  for (i = 0; i < n && i < m; i++) {
    temp = arr[i];
    while (temp > brr[j] && j < m) {
      j++;
    }
    if (j == m) break;
    count++;
    j++;
  }
  printf("%d\n", n - count);
}
