#include <bits/stdc++.h>
using namespace std;
const int N = 2048;
int n, m, log2n, t, ans, l[N], s[N], c[N];
int dp[N][N], mxv[N][N * 2];
void update(int *num, int *val) {
  for (int i = 0; i < t; ++i) val[i | t] = num[i];
  for (int i = t - 1; i; --i) val[i] = max(val[i << 1], val[i << 1 | 1]);
}
int calc(int p, int mask) {
  int ans = c[p];
  while (mask & 1) ans += c[++p], mask >>= 1;
  return ans;
}
template <typename _T>
inline void chkmax(_T &x, _T y) {
  if (x < y) x = y;
}
int main() {
  cin >> n >> m;
  log2n = log2(n), t = 1 << (log2n + 1);
  for (int i = n; i; i--) cin >> l[i];
  for (int i = n; i; i--) cin >> s[i];
  for (int i = 1; i <= m + log2n; ++i) cin >> c[i];
  memset(dp, 0xc0, sizeof(dp)), dp[0][1] = 0;
  for (int i = 0; i <= m; ++i) update(dp[i], mxv[i]);
  for (int i = 1; i <= n; ++i) {
    int val = l[i], w;
    for (int j = val; j >= 0; --j) {
      w = max(log2n + 1 - val + j, 0);
      for (int k = 0; k < (1 << w); ++k)
        chkmax(dp[val][k + 1], mxv[j][k | (1 << w)] + calc(val, k) - s[i]);
    }
    update(dp[val], mxv[val]);
  }
  for (int i = 0; i <= m; ++i) ans = max(ans, mxv[i][1]);
  cout << ans << endl;
}
