#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[3010], b[3010];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  int *x = a, *y = b;
  int ans = 0;
  while (x != a + n) {
    if (y == b + m) {
      ans++;
    } else {
      while (*x > *y && y != b + m) y++;
      if (y == b + m)
        ans++;
      else
        y++;
    }
    x++;
  }
  cout << ans << endl;
  return 0;
}
