#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int inf = 0x3f3f3f3f;
int arr[3005], arr2[3005];
int n, m;
int main(int argc, char const* argv[]) {
  scanf("%d%d", &n, &m);
  for (int i = 0, __ = n; i < __; i++) scanf("%d", &arr[i]);
  for (int j = 0, __ = m; j < __; j++) {
    scanf("%d", &arr2[j]);
  }
  int i = 0, j = 0;
  while (i < n && j < m) {
    if (arr[i] <= arr2[j]) {
      i++;
      j++;
    } else
      j++;
  }
  int ans = n - i;
  printf("%d\n", ans);
  return 0;
}
