#include <bits/stdc++.h>
using namespace std;
unsigned long long mod = 1000000007;
int n_val, m_val, val, more;
vector<int> req, avail;
int done[1000001];
void read() {
  req.clear();
  avail.clear();
  more = 0;
  cin >> n_val >> m_val;
  while (n_val--) {
    cin >> val;
    req.push_back(val);
  }
  while (m_val--) {
    cin >> val;
    avail.push_back(val);
  }
  return;
}
void solve() {
  memset(done, 0, sizeof(done));
  for (int pos = 0; pos < int((req).size()); pos++) {
    vector<int>::iterator it = find((avail).begin(), (avail).end(), req[pos]);
    if (it != avail.end()) {
      avail.erase(it);
      done[req[pos]] = 1;
    }
  }
  for (int pos = 0; pos < int((req).size()); pos++) {
    if (done[req[pos]]) continue;
    vector<int>::iterator it =
        upper_bound((avail).begin(), (avail).end(), req[pos]);
    if (it != avail.end())
      avail.erase(it);
    else
      more++;
  }
  return;
}
void write() {
  cout << more << "\n";
  return;
}
int main() {
  read();
  solve();
  write();
  return 0;
}
