#include <bits/stdc++.h>
using namespace std;
void plb() { cout << "-------------------------------------------\n"; }
void printVb(vector<bool> v) {
  for (const auto &n : v) {
    cout << n << ", ";
  }
  cout << "\n";
}
void printVc(vector<char> v) {
  for (const auto &n : v) {
    cout << n << ", ";
  }
  cout << "\n";
}
void printVi(vector<int> v) {
  for (const auto &n : v) {
    cout << n << ", ";
  }
  cout << "\n";
}
void printVl(vector<long> v) {
  for (const auto &n : v) {
    cout << n << ", ";
  }
  cout << "\n";
}
void printVii(vector<pair<int, int>> v) {
  for (const auto &p : v) {
    cout << "(" << p.first << ", " << p.second << "), ";
  }
  cout << "\n";
}
void printMap(unordered_map<int, short> map) {
  for (auto const &[key, val] : map) {
    printf("(%d, %d), ", key, val);
  }
  cout << "\n";
}
int min3(int a, int b, int c) { return min(a, min(b, c)); }
int max3(int a, int b, int c) { return max(a, max(b, c)); }
void printii(int a, int b) { cout << "a = " << a << ", b = " << b << "\n"; }
void printAdjList(vector<vector<int>> adjList) {
  for (int i = 0; i < adjList.size(); ++i) {
    printVi(adjList[i]);
  }
}
vector<int> o1{-1, 1};
vector<int> o2{-1, 1};
vector<pair<int, int>> o3{{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
vector<pair<int, int>> o4{{-1, -1}, {-1, 0}, {-1, 1}, {0, -1},
                          {0, 1},   {1, -1}, {1, 0},  {1, 1}};
void bfs(vector<vector<int>> adjList) {
  vector<bool> visited;
  visited.assign(adjList.size(), false);
  vector<int> dist;
  dist.assign(adjList.size(), -1);
  deque<int> dq;
  dq.push_back(0);
  visited[0] = true;
  dist[0] = 0;
  while (!dq.empty()) {
    int cur = dq.front();
    dq.pop_front();
    for (int nbr : adjList[cur]) {
      if (!visited[nbr]) {
        dist[nbr] = dist[cur] + 1;
        visited[nbr] = true;
        dq.push_back(nbr);
      }
    }
  }
}
struct node {
  int key;
  struct node *left;
  struct node *right;
  int height;
  int size;
};
int max(int a, int b);
int height(struct node *N) {
  if (N == NULL) return 0;
  return N->height;
}
int size(struct node *N) {
  if (N == NULL) return 0;
  return N->size;
}
int max(int a, int b) { return (a > b) ? a : b; }
vector<int> countSmallerRight(vector<int> arr) {
  int N = arr.size();
  set<int> s;
  vector<int> countSmaller;
  countSmaller.resize(N);
  for (int i = N - 1; i >= 0; i--) {
    s.insert(arr[i]);
    auto it = s.lower_bound(arr[i]);
    countSmaller[i] = distance(s.begin(), it);
  }
  return countSmaller;
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> arr1(N);
  for (int i = 0; i < N; ++i) {
    cin >> arr1[i];
  }
  vector<int> arr2(M);
  for (int i = 0; i < M; ++i) {
    cin >> arr2[i];
  }
  int ptr1 = 0;
  int ptr2 = 0;
  while (ptr1 < N && ptr2 < M) {
    if (arr1[ptr1] <= arr2[ptr2]) {
      ++ptr1;
      ++ptr2;
    } else {
      ++ptr2;
    }
  }
  cout << (N - ptr1) << "\n";
  return 0;
}
