#include <bits/stdc++.h>
using namespace std;
inline int add(int _a, int _b) {
  if (_a < 0) {
    _a += 1000000007;
  }
  if (_b < 0) {
    _b += 1000000007;
  }
  if (_a + _b >= 1000000007) {
    return _a + _b - 1000000007;
  }
  return _a + _b;
}
inline int mul(int _a, int _b) {
  if (_a < 0) {
    _a += 1000000007;
  }
  if (_b < 0) {
    _b += 1000000007;
  }
  return ((long long int)((long long int)_a * (long long int)_b)) % 1000000007;
}
const int N = 2000;
int n, m, agr[N + 10], price[N + 10], rev[(N << 1) + 10];
int id[(N << 1) + 10], limit[(N << 1) + 10];
vector<vector<vector<int> > > dp;
void input() {
  int i, j;
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; ++i) {
    scanf("%d", &agr[i]);
    id[agr[i]]++;
  }
  for (i = 1; i <= n; ++i) {
    scanf("%d", &price[i]);
  }
  for (i = 1; i <= n + m; ++i) {
    scanf("%d", &rev[i]);
  }
}
void solve() {
  int i, j, cnt;
  for (i = 1, limit[0] = 0; i <= n + m + 1; ++i) {
    limit[i] = limit[i - 1] / 2 + id[i];
  }
  dp.resize(n + 1);
  for (i = 0; i <= n; ++i) {
    dp[i].resize(n + m + 2);
    for (j = 0; j <= n + m + 1; ++j) {
      dp[i][j].resize(limit[j] + 1);
    }
  }
  dp[0][n + m + 1][0] = 0;
  for (i = 0; i <= n; ++i) {
    for (j = n + m; j >= 0; --j) {
      for (cnt = 0; cnt <= limit[j]; ++cnt) {
        dp[i][j][cnt] = -INT_MAX;
        if (i - 1 >= 0) {
          dp[i][j][cnt] = max(dp[i][j][cnt], dp[i - 1][j][cnt]);
        }
        if (j <= n + m) {
          dp[i][j][cnt] =
              max(dp[i][j][cnt], rev[j] * cnt + dp[i][j + 1][cnt / 2]);
        }
        if (i - 1 >= 0 && agr[i] == j) {
          dp[i][j][cnt] = max(dp[i][j][cnt], -price[i] + dp[i - 1][j][cnt + 1]);
        }
      }
    }
  }
  printf("%d", dp[n][0][0]);
  puts("");
}
int main() {
  input();
  solve();
}
