#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 9;
const long long mod = 998244353;
int dp[N << 1][N], l[N], s[N], c[N << 1], sum[N];
int main() {
  int n, m, ans = 0;
  scanf("%d%d", &n, &m);
  for (int i = (0); i < (n); ++i) scanf("%d", &l[i]);
  for (int i = (0); i < (n); ++i) scanf("%d", &s[i]);
  for (int i = (1); i < (n + m + 1); ++i) scanf("%d", &c[i]);
  for (int i = (0); i < (n); ++i) s[i] = c[l[i]] - s[i];
  for (int i = (0); i < (N << 1); ++i)
    for (int j = (0); j < (N); ++j) dp[i][j] = -1000000000;
  for (int i = (0); i < (N << 1); ++i) dp[i][0] = 0;
  for (int i = (n)-1; i >= (0); --i) {
    int num = sum[l[i]] + 1, L = l[i];
    for (int j = (num + 1) - 1; j >= (1); --j) {
      int cnt = j;
      int val = dp[L][cnt - 1] + s[i];
      for (int p = L; cnt;) {
        sum[p] = max(sum[p], cnt);
        dp[p][cnt] = max(dp[p][cnt], val);
        ++p;
        cnt >>= 1;
        val += c[p] * cnt;
      }
      ans = max(ans, val);
    }
    for (int i = (1); i < (n + m + 1); ++i)
      dp[i][0] = max(dp[i][0], max(dp[i - 1][0], dp[i - 1][1]));
  }
  cout << ans;
}
