#include <bits/stdc++.h>
using namespace std;
inline int in() {
  char ch = getchar();
  int f = 1, x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return f * x;
}
const int inf = (1 << 30);
const int mod = 998244353;
const int N = 5005;
int n, m, l[N], s[N], c[N];
int mx[N], top[N], ans;
int q[N][N], qq[N], f[N][N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", &l[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &s[i]);
  for (int i = 1; i <= n + m; ++i) scanf("%d", &c[i]);
  for (int i = 1; i <= n; ++i) s[i] = c[l[i]] - s[i];
  int ans = 0;
  memset(f, 233, sizeof(f));
  for (int i = 1; i <= n + m; ++i) f[i][0] = 0;
  for (int i = n; i >= 1; --i) {
    int L = l[i];
    for (int j = mx[L]; j >= 0; --j) {
      int val = f[L][j] + s[i], t = j + 1;
      for (int p = L; t;) {
        mx[p] = max(mx[p], t);
        f[p][t] = max(f[p][t], val);
        p++;
        t /= 2;
        val += c[p] * t;
      }
      ans = max(ans, val);
    }
    for (int j = 1; j <= n + m; ++j)
      f[j][0] = max(f[j][0], max(f[j - 1][0], f[j - 1][1]));
  }
  printf("%d\n", ans);
}
