#include <bits/stdc++.h>
using namespace std;
void add(int& a, int b, int mod) { a = (a + b) % mod; }
void sub(int& a, int b, int mod) { a = ((a - b) % mod + mod) % mod; }
void mul(int& a, int b, int mod) { a = (a * 1ll * b) % mod; }
template <class T>
bool umin(T& a, const T& b) {
  return a > b ? a = b, true : false;
}
template <class T>
bool umax(T& a, const T& b) {
  return a < b ? a = b, true : false;
}
template <int sz>
using tut = array<int, sz>;
void usaco(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int N = 4e3 + 5;
const int mod = 1e9 + 7;
const long long inf = 1e18;
const long double Pi = acos(-1);
int n, m, k, t, q, ans, res, a[N];
int prof[N], dp[N][N], c[N];
void solve(int t_case) {
  memset(dp, -127, sizeof dp);
  cin >> n >> m;
  for (int i = n; i > 0; i--) cin >> a[i];
  for (int i = n; i > 0; i--) cin >> c[i];
  for (int i = 1; i <= n + m; i++) cin >> prof[i], dp[i][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = n; j > 0; j--)
      umax(dp[a[i]][j], dp[a[i]][j - 1] - c[i] + prof[a[i]]);
    for (int j = a[i]; j < n + m; j++) {
      for (int l = n >> (j - a[i]); l >= 0; l--) {
        umax(dp[j + 1][l / 2], dp[j][l] + prof[j + 1] * (l / 2));
      }
    }
  }
  for (int i = 1; i <= n + m; i++)
    for (int j = 0; j < 2; j++) umax(res, dp[i][j]);
  cout << res << "\n";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (0) {
    int t;
    cin >> t;
    for (int t_case = 1; t_case <= t; t_case++) solve(t_case);
  } else
    solve(1);
  return 0;
}
