#include <bits/stdc++.h>
using namespace std;
inline void read(long long &x) {
  char ch = getchar();
  long long f = 0;
  x = 0;
  while (!isdigit(ch)) {
    if (ch == '-') f = 1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar();
  if (f) x = -x;
}
const long long N = 2038;
long long n, m, mx, res, l[N], s[N], c[N << 1], f[N << 1][N << 1];
inline void modify(long long p, long long x) {
  long long tmp = 1;
  while (f[p][tmp - 1] != INT_MIN) ++tmp;
  for (long long i = tmp - 1; i >= 1; --i)
    (f[p][i] =
         f[p][i] > f[p][i - 1] + c[p] - x ? f[p][i] : f[p][i - 1] + c[p] - x);
}
inline void update(long long p) {
  for (long long i = 0; i <= n && f[p][i] != INT_MIN; ++i)
    (f[p + 1][i >> 1] = f[p + 1][i >> 1] > f[p][i] + (i >> 1) * c[p + 1]
                            ? f[p + 1][i >> 1]
                            : f[p][i] + (i >> 1) * c[p + 1]);
  if (p < n + m) update(p + 1);
}
signed main() {
  read(n), read(m);
  for (long long i = 1; i <= n; ++i) read(l[i]);
  for (long long i = 1; i <= n; ++i) read(s[i]);
  for (long long i = 1; i <= n + m; ++i)
    for (long long j = 0; j <= n * 2; ++j) f[i][j] = INT_MIN;
  for (long long i = 1; i <= n + m; ++i) read(c[i]), f[i][0] = 0;
  for (long long i = n; i >= 1; --i) modify(l[i], s[i]), update(l[i]);
  for (long long i = 1; i <= n + m + 1; ++i)
    (res = res > f[i][1] ? res : f[i][1]);
  return printf("%lld\n", res), 0;
}
