#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 5;
int n, m;
int l[maxn], s[maxn], c[2 * maxn];
int dp[2 * maxn][maxn];
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n >> m;
  m += n;
  for (int i = 1; i <= n; ++i) {
    cin >> l[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> s[i];
  }
  for (int i = 1; i <= m; ++i) {
    cin >> c[i];
  }
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= m; ++j) {
      dp[j][i] = -1e9;
    }
  }
  for (int i = 0; i <= m; ++i) {
    dp[i][0] = 0;
  }
  for (int i = n; i; --i) {
    for (int j = n; j; --j) {
      dp[l[i]][j] = max(dp[l[i]][j], dp[l[i]][j - 1] + c[l[i]] - s[i]);
    }
    for (int j = l[i]; j < m; ++j) {
      for (int k = 0; k <= (n >> j - l[i]); ++k) {
        dp[j + 1][k >> 1] =
            max(dp[j + 1][k >> 1], dp[j][k] + (k >> 1) * c[j + 1]);
      }
    }
  }
  cout << dp[m][0];
  return 0;
}
