#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> a, b, p;
vector<vector<int> > deadlinesAt;
multiset<pair<int, int> > buildings;
int main() {
  scanf("%d %d", &n, &m);
  a.resize(n);
  b.resize(m);
  p.resize(m);
  deadlinesAt.resize(n);
  for (int i = 0; i < (int)(n); ++i) scanf("%d", &a[i]);
  for (int i = 0; i < (int)(m); ++i) scanf("%d", &b[i]);
  for (int i = 0; i < (int)(m); ++i) scanf("%d", &p[i]);
  for (int i = 0; i < (int)(m); ++i) buildings.insert({b[i], p[i]});
  for (int i = n - 1; i >= 0; i--) {
    while (true) {
      auto it = buildings.lower_bound({a[i] + 1, 0});
      if (it == buildings.begin()) break;
      it--;
      deadlinesAt[i].push_back(it->second);
      buildings.erase(it);
    }
  }
  long long balance = 0;
  priority_queue<int> spent;
  for (int i = 0; i < (int)(n); ++i) {
    balance += a[i];
    for (auto &p : deadlinesAt[i]) {
      if (p <= balance) {
        spent.push(p);
        balance -= p;
      } else {
        if (!spent.empty() && spent.top() > p) {
          balance += spent.top();
          spent.pop();
          spent.push(p);
          balance -= p;
        }
      }
    }
  }
  cout << spent.size() << endl;
  return 0;
}
