#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long ans = 0, arr[n + 1], brr[m + 1];
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  for (long long i = 1; i <= m; i++) {
    cin >> brr[i];
  }
  long long index1 = 1, index2 = 1;
  while (index2 <= m && index1 <= n) {
    if (arr[index1] <= brr[index2]) {
      index1++;
      index2++;
      ans++;
    } else {
      index2++;
    }
  }
  cout << n - ans << endl;
  ;
}
