#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &read_num) {
  read_num = 0;
  int is_f = 1;
  char read_ch = getchar();
  while (read_ch < '0' || read_ch > '9') {
    if (read_ch == '-') is_f = -1;
    read_ch = getchar();
  }
  while (read_ch >= '0' && read_ch <= '9') {
    read_num = (read_num << 1) + (read_num << 3) + (read_ch ^ 48);
    read_ch = getchar();
  }
  read_num *= is_f;
}
const int MAXN = 2005;
const int MAXM = 2005;
int n, m;
int l[MAXN], s[MAXN], c[MAXN + MAXM], f[MAXN + MAXM][MAXN];
int main() {
  read(n);
  read(m);
  for (int i = n; i >= 1; --i) read(l[i]);
  for (int i = n; i >= 1; --i) read(s[i]);
  for (int i = 1; i <= n + m; ++i) read(c[i]);
  memset(f, 0x80, sizeof(f));
  for (int i = 0; i <= m; ++i) f[i][0] = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = n; j >= 1; --j)
      f[l[i]][j] = max(f[l[i]][j], f[l[i]][j - 1] + c[l[i]] - s[i]);
    for (int j = l[i]; j <= n + m; ++j)
      for (int k = 0; k <= (n >> (j - l[i])); ++k)
        f[j + 1][k / 2] = max(f[j + 1][k / 2], f[j][k] + k / 2 * c[j + 1]);
  }
  printf("%d", f[n + m][0]);
  return 0;
}
