#include <bits/stdc++.h>
using namespace std;
long long a[200005];
int main() {
  int n, m, a[3005], b[3005];
  while (cin >> n >> m) {
    priority_queue<int> pq;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= m; i++) {
      cin >> b[i];
      pq.push(-b[i]);
    }
    sort(a + 1, a + n + 1);
    int ans = 0;
    for (int i = 1; i <= n; i++) {
      bool ck = 1;
      while (pq.size() > 0) {
        int top = -pq.top();
        if (top >= a[i]) {
          pq.pop();
          ck = 0;
          break;
        } else
          pq.pop();
      }
      ans += ck;
    }
    cout << ans << endl;
  }
  return 0;
}
