#include <bits/stdc++.h>
using namespace std;
int n, m, g[3005], r[3005], ans;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &r[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &g[i]);
  }
  int temp = 0;
  for (int i = 0; i < m && temp < n; i++) {
    if (g[i] >= r[temp]) {
      temp++;
    }
  }
  printf("%d", n - temp);
  return 0;
}
