#include <bits/stdc++.h>
using namespace std;
inline int Scan() {
  int x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
template <typename T, typename U>
static inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static inline void amax(T &x, U y) {
  if (x < y) x = y;
}
int main() {
  int n, m;
  cin >> n >> m;
  int a[n];
  int b[m];
  for (int i = (0); i < (n); i++) cin >> a[i];
  for (int i = (0); i < (m); i++) cin >> b[i];
  int i = 0, j = 0;
  while (i < n && j < m) {
    i += 1 * (a[i] <= b[j]);
    j += 1;
  }
  cout << n - i << endl;
}
