#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int M = 1e4 + 10;
const int N = 5e3 + 10;
using namespace std;
inline long long read() {
  long long sum = 0, b = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') b = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    sum = sum * 10 + c - '0';
    c = getchar();
  }
  return b * sum;
}
struct node {
  int l, s;
} a[N];
int t, n, m, k, x;
int ans, sum[N];
bool vis[N];
int c[M], dp[N][N];
bool cmp(node x, node y) { return x.l < y.l; }
int main() {
  int i, j;
  n = read(), m = read();
  for (i = 1; i <= n; i++) {
    a[i].l = read();
  }
  for (i = 1; i <= n; i++) {
    a[i].s = read();
  }
  for (i = 1; i <= n + m; i++) {
    c[i] = read();
  }
  for (i = 0; i <= n + m; i++)
    for (j = 1; j <= n; j++) dp[i][j] = -0x7fffffff;
  for (i = 0; i <= n + m; i++) dp[i][0] = 0;
  for (i = n; i >= 1; i--) {
    sum[a[i].l]++;
    for (k = sum[a[i].l]; k >= 1; k--) {
      dp[a[i].l][k] =
          max(dp[a[i].l][k], dp[a[i].l][k - 1] - a[i].s + c[a[i].l]);
    }
    for (j = 0; j <= n + m - 1; j++) {
      for (k = sum[j]; k >= 0; k--) {
        if (dp[j][k] == -0x7fffffff) continue;
        dp[j + 1][k / 2] = max(dp[j + 1][k / 2], dp[j][k] + c[j + 1] * (k / 2));
        sum[j + 1] = max(sum[j + 1], k / 2);
      }
    }
  }
  for (i = 0; i <= n + m; i++) ans = max(ans, dp[i][1]);
  printf("%d", ans);
  return 0;
}
