#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a[3000], b[3000], ans;
  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);
  ans = n;
  for (int i = 0, j = 0; i < n && j < m;)
    if (a[i] <= b[j])
      i++, j++, ans--;
    else
      j++;
  printf("%d\n", ans);
  return 0;
}
