#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100005;
int n, m;
int a[Maxn];
int b[Maxn];
int p[Maxn];
vector<pair<int, int> > seq;
int pnt;
int res;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
    seq.push_back(pair<int, int>(b[i], i));
  }
  for (int i = 0; i < m; i++) scanf("%d", &p[i]);
  sort(seq.begin(), seq.end());
  priority_queue<pair<int, int> > Q;
  int mx = 0;
  for (int i = n - 1; i >= 0; i--) {
    mx = max(mx, a[i]);
    while (pnt < seq.size() && seq[pnt].first <= mx) {
      int ind = seq[pnt].second;
      Q.push(pair<int, int>(-p[ind], ind));
      pnt++;
    }
    while (!Q.empty() && a[i] >= -Q.top().first) {
      res++;
      a[i] += Q.top().first;
      Q.pop();
    }
    if (!Q.empty()) {
      pair<int, int> v = Q.top();
      Q.pop();
      v.first += a[i];
      Q.push(v);
    }
  }
  printf("%d\n", res);
  return 0;
}
