#include <bits/stdc++.h>
using namespace std;
int arr[30002];
int arr2[30002];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < m; i++) cin >> arr2[i];
  int ind = 0;
  for (int i = 0; i < m; i++) {
    if (arr[ind] <= arr2[i]) ind++;
  }
  if (ind >= n)
    cout << 0;
  else
    cout << n - ind;
  return 0;
}
