#include <bits/stdc++.h>
using namespace std;
template <class P, class Q>
void mmin(P &a, const Q &b) {
  if (b < a) a = b;
}
template <class P, class Q>
void mmax(P &a, const Q &b) {
  if (b > a) a = b;
}
template <class P, class Q>
bool mminb(P &a, const Q &b) {
  if (b < a) return a = b, true;
  return false;
}
template <class P, class Q>
bool mmaxb(P &a, const Q &b) {
  if (b > a) return a = b, true;
  return false;
}
template <class P>
P GCD(P a, P b) {
  if (a < b) swap(a, b);
  P c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
const int MAXn = 3000;
int n, m;
int a[MAXn], b[MAXn];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < (n); ++i) cin >> a[i];
  for (int i = 0; i < (m); ++i) cin >> b[i];
  int j = m - 1, ans = 0;
  for (int i = n - 1; i >= 0; --i)
    if (j >= 0 && b[j] >= a[i])
      --j;
    else
      ++ans;
  cout << ans << endl;
  return 0;
}
