#include <bits/stdc++.h>
using namespace std;
struct Candidate {
  int aggressive;
  int cost;
  Candidate() : aggressive(0), cost(0) {}
};
int n, m;
vector<Candidate> candidates;
vector<int> profit, numOfCandidatesByAggr;
vector<vector<int>> dp;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m;
  candidates.resize(n + 1);
  profit.resize(n + m + 1, 0);
  for (int i = 1; i <= n; ++i) cin >> candidates[i].aggressive;
  for (int i = 1; i <= n; ++i) cin >> candidates[i].cost;
  for (int i = 1; i <= n + m; ++i) cin >> profit[i];
  for (int i = 1; i <= n; ++i)
    candidates[i].cost = profit[candidates[i].aggressive] - candidates[i].cost;
  int ans = 0;
  numOfCandidatesByAggr.resize(n + m + 1, 0);
  dp.resize(n + m + 1, vector<int>(n + m + 1, -1e9));
  for (int i = 1; i <= n + m; ++i) dp[i][0] = 0;
  for (int i = n; i >= 1; --i) {
    int curAggr = candidates[i].aggressive;
    for (int j = numOfCandidatesByAggr[curAggr]; j >= 0; --j) {
      int val = dp[curAggr][j] + candidates[i].cost;
      int t = j + 1;
      for (int k = curAggr; t;) {
        numOfCandidatesByAggr[k] = max(numOfCandidatesByAggr[k], t);
        dp[k][t] = max(dp[k][t], val);
        ++k;
        t /= 2;
        val += profit[k] * t;
      }
      ans = max(ans, val);
    }
    for (int j = 1; j <= n + m; ++j)
      dp[j][0] = max(dp[j][0], max(dp[j - 1][0], dp[j - 1][1]));
  }
  cout << ans << '\n';
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
