#include <bits/stdc++.h>
using namespace std;
const long long N = 100010;
pair<long long, long long> D[N];
long long A[N];
vector<long long> P[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n; ++i) cin >> A[i];
  for (long long i = 0; i < m; ++i) cin >> D[i].first;
  for (long long i = 0; i < m; ++i) cin >> D[i].second;
  sort(D, D + m);
  long long j1 = 0;
  for (long long i = n - 1; i >= 0; --i) {
    while (j1 < m and D[j1].first <= A[i]) {
      P[i].push_back(j1);
      ++j1;
    }
  }
  long long sum = 0;
  long long preu = 0;
  priority_queue<long long> Q;
  for (int i = 0; i < n; ++i) {
    preu += A[i];
    for (int j = 0; j < (int)P[i].size(); ++j) {
      sum += D[P[i][j]].second;
      Q.push(D[P[i][j]].second);
    }
    while (sum > preu) {
      sum -= Q.top();
      Q.pop();
    }
  }
  cout << Q.size() << endl;
}
