#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, count = 0;
  ;
  cin >> n >> m;
  vector<int> a, b;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    b.push_back(x);
  }
  vector<int>::iterator it1, it2;
  ;
  for (it1 = a.begin(), it2 = b.begin(); it1 != a.end() && it2 != b.end();) {
    if (*it1 == *it2) {
      a.erase(it1);
      b.erase(it2);
    } else if (*it1 > *it2) {
      it2++;
    } else {
      it1++;
    }
  }
  int t = a.size();
  int y = b.size();
  for (it1 = a.begin(), it2 = b.begin(); it1 != a.end() && it2 != b.end();) {
    if (*it1 < *it2) {
      a.erase(it1);
      b.erase(it2);
    } else {
      it2++;
    }
  }
  cout << a.size();
}
