#include <bits/stdc++.h>
using namespace std;
void File() {
  freopen("output.txt", "w", stdout);
  freopen("input.txt", "r", stdin);
}
void fast() {
  ios::sync_with_stdio(NULL);
  cout.tie(NULL);
  cin.tie(NULL);
}
int main() {
  fast();
  int n, m, x, cnt = 0;
  cin >> n >> m;
  map<int, int> arr;
  map<int, int> arr1;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    arr[x]++;
  }
  for (long long i = 0; i < m; i++) {
    cin >> x;
    arr1[x]++;
  }
  for (auto it = arr.begin(); it != arr.end(); it++) {
    for (auto it1 = arr1.begin(); it1 != arr1.end(); it1++) {
      if (it1->second > 0 && it1->first >= it->first) {
        if (it1->second == it->second) {
          it1->second = 0;
          it->second = 0;
          break;
        } else if (it1->second > it->second) {
          it1->second -= it->second;
          it->second = 0;
          break;
        } else {
          it->second -= it1->second;
          it1->second = 0;
        }
      } else
        continue;
    }
  }
  for (auto it : arr)
    if (it.second > 0) cnt++;
  cout << cnt << endl;
  return 0;
}
