#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
template <typename T, typename TT>
ostream& operator<<(ostream& s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int(i) = 0; (i) < (((int)((t).size()))); ++(i)) s << t[i] << " ";
  return s;
}
int a[3006], b[3006];
int main() {
  int(n), (m);
  scanf("%d %d", &(n), &(m));
  for (int(i) = 0; (i) < (n); ++(i)) scanf("%d", a + i);
  for (int(j) = 0; (j) < (m); ++(j)) scanf("%d", b + j);
  int j = m - 1, res = 0;
  for (int(i) = (n - 1); (i) >= (0); --i) {
    if (j == -1) {
      ++res;
    } else if (b[j] >= a[i]) {
      --j;
    } else {
      ++res;
    }
  }
  pisz(res);
}
