#include <bits/stdc++.h>
using namespace std;
long long power(long long n, long long p, long long mod) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    long long c = power(n, p / 2, mod);
    return (c % mod * c % mod) % mod;
  }
  return (n % mod * power(n, p - 1, mod) % mod) % mod;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int n, m, i;
vector<int> a, b;
map<int, int> cnta, cntb;
int ans = 0;
bool vis[30000] = {false};
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    cnta[x]++;
    a.push_back(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    cntb[x]++;
    b.push_back(x);
  }
  for (int i = 0; i < n; i++) {
    map<int, int>::iterator it = cntb.lower_bound(a[i]);
    if (it != cntb.end()) {
      vis[i] = true;
      it->second--;
      if (it->second == 0) cntb.erase(it);
    }
  }
  for (int i = 0; i < n; i++) ans += (vis[i] == false);
  cout << ans;
  return 0;
}
