#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
long long dp[2050][2050], ansmax[2050][2050];
int pr[2050][2050];
long long ls[5000], ss[5000], cs[5000];
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> ls[i];
  for (int i = 0; i < n; ++i) cin >> ss[i];
  for (int i = 1; i <= n + m; ++i) cin >> cs[i];
  for (int l = 1; l <= m; ++l) pr[n][l] = n;
  for (int i = n - 1; i >= 0; --i) {
    memcpy(pr[i], pr[i + 1], sizeof(pr[i + 1]));
    pr[i][ls[i]] = i;
  }
  long long ans = 0;
  for (int l = 1; l <= m; ++l)
    for (int i = n - 1; i >= 0; --i)
      if (ls[i] == l) {
        for (int j = 1; j <= n; ++j)
          if (pr[i + 1][l] < n)
            dp[i][j] = dp[pr[i + 1][l]][j];
          else
            dp[i][j] = -INF;
        dp[i][1] = max(dp[i][1], -ss[i] + cs[ls[i]]);
        if (pr[i + 1][l] < n)
          for (int j = 2; j <= n; ++j)
            if (dp[pr[i + 1][l]][j - 1] != -INF)
              dp[i][j] =
                  max(dp[i][j], dp[pr[i + 1][l]][j - 1] - ss[i] + cs[ls[i]]);
        for (int ll = l - 1; ll > 0; --ll) {
          int pri = pr[i + 1][ll];
          if (pri == n) continue;
          if (l - ll > 14) {
            dp[i][1] =
                max(dp[i][1], ansmax[pr[i + 1][ll]][n] - ss[i] + cs[ls[i]]);
            continue;
          }
          for (int prj = 1; prj <= n; ++prj)
            if (dp[pri][prj] != -INF) {
              long long v = dp[pri][prj];
              int kol = prj;
              for (int lev = ll + 1; lev <= l; ++lev) {
                kol /= 2;
                v += kol * cs[lev];
              }
              dp[i][kol + 1] = max(dp[i][kol + 1], v - ss[i] + cs[ls[i]]);
              if (kol > 0) dp[i][kol] = max(dp[i][kol], v);
            }
        }
        ansmax[i][0] = -INF;
        for (int j = 1; j <= n; ++j) {
          long long v = dp[i][j];
          int kol = j;
          for (int lev = l + 1; kol > 0; ++lev) {
            kol /= 2;
            v += kol * cs[lev];
          }
          ans = max(ans, v);
          ansmax[i][j] = max(ansmax[i][j - 1], v);
        }
      }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int test;
  test = 1;
  while (test--) solve();
  return 0;
}
