#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("fast-math")
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int MAXN = 4000;
const int INF = 1e9;
int dp[MAXN][MAXN];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> l(n);
  for (int i = 0; i < n; i++) {
    cin >> l[i];
    l[i]--;
  }
  vector<int> s(n);
  for (int i = 0; i < n; i++) cin >> s[i];
  vector<int> c(n + m);
  for (int i = 0; i < n + m; i++) {
    cin >> c[i];
  }
  for (int i = 0; i < MAXN; i++) {
    for (int j = 0; j < MAXN; j++) {
      dp[i][j] = -INF;
    }
  }
  int cnt[MAXN];
  memset(cnt, 0, sizeof cnt);
  dp[0][0] = 0;
  for (int i = n - 1; i > -1; i--) {
    int agg = l[i];
    for (int j = agg; j > -1; j--) {
      for (int ct = cnt[j]; ct > -1; ct--) {
        int extr = 0;
        int cct = ct;
        int curagg = j;
        while (curagg < agg) {
          curagg++;
          cct /= 2;
          extr += cct * c[curagg];
        }
        dp[agg][cct + 1] =
            max(dp[agg][cct + 1], dp[j][ct] + extr + c[agg] - s[i]);
        cnt[agg] = max(cnt[agg], cct + 1);
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < n + m; i++) {
    for (int j = 0; j < cnt[i] + 1; j++) {
      int extr = 0;
      int cct = j;
      int curagg = i;
      while (cct > 0) {
        curagg++;
        cct /= 2;
        extr += cct * c[curagg];
      }
      ans = max(ans, dp[i][j] + extr);
    }
  }
  cout << ans << '\n';
  return 0;
}
