#include <bits/stdc++.h>
using namespace std;
void c_p() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int vis[5000], a[5000], b[5000];
int main() {
  c_p();
  int m, n, i = 0, j = 0, ans;
  cin >> n >> m;
  int a[n], b[m];
  ans = n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  while (i < n) {
    if (j >= m) break;
    while (j < m) {
      if (b[j] >= a[i]) ans -= 1, i += 1;
      j += 1;
    }
    i++;
  }
  cout << max(0, ans) << endl;
}
