#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int a[3000];
int b[3000];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  int j = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (j == m) break;
    while (a[i] > b[j] && j < m) {
      j++;
    }
    if (j == m) break;
    if (a[i] <= b[j]) {
      cnt++;
      j++;
    }
  }
  cout << n - cnt << endl;
  return 0;
}
