#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const vector<int> mods = {998244353, 1000000007, 1000000009};
const long long inf = 3e18;
const double pi = acos(-1.0);
const double eps = 0.0000001;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class... K>
using umap = unordered_map<K...>;
template <class... K>
using uset = unordered_set<K...>;
const int N = 20100;
const int M = 2100;
int n, m, l[N], s[N], c[N];
long long dp[M][M];
void solve(int _t) {
  cin >> n >> m;
  for (long long i = (0); i < (n); ++i) cin >> l[i];
  for (long long i = (0); i < (n); ++i) cin >> s[i];
  for (long long i = (0); i < (n + m); ++i) cin >> c[i + 1];
  long long res = 0;
  fill(&dp[0][0], &dp[0][0] + sizeof(dp) / sizeof(dp[0][0]) - 1, -inf);
  for (long long i = (0); i < (m + 1); ++i) dp[i][0] = 0;
  for (int i = n - 1; i >= 0; i--) {
    for (long long j = (0); j < (l[i]); ++j)
      dp[l[i]][0] = max(dp[l[i]][0], dp[j][0]);
    for (int a_ = n - 1; a_ >= 0; a_--) {
      long long amt = a_;
      dp[l[i]][amt + 1] =
          max(dp[l[i]][amt + 1], dp[l[i]][amt] + c[l[i]] - s[i]);
      if (amt + 1 <= 1) res = max(res, dp[l[i]][amt + 1]);
      long long jp = 1;
      long long cur = amt + 1;
      bool ex = 0;
      while (!ex) {
        dp[l[i] + jp][cur / 2] =
            max(dp[l[i] + jp][cur / 2],
                dp[l[i] + jp - 1][cur] + (cur / 2) * c[l[i] + jp]);
        if (cur / 2 <= 1) res = max(res, dp[l[i] + jp][cur / 2]);
        cur /= 2;
        jp++;
        if (cur == 0) ex = 1;
      }
    }
  }
  cout << res << "\n";
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cout.precision(13);
  int t = 1;
  while (t--) solve(t);
  return 0;
}
