#include <bits/stdc++.h>
using namespace std;
const long long M = 2048;
const long long inf = 1LL << 60;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  vector<long long> l(n), c(n);
  for (long long i = 0; i < n; i++) cin >> l[i];
  for (long long i = 0; i < n; i++) cin >> c[i];
  vector<long long> p(n + m + 1, 0);
  for (long long i = 1; i <= n + m; i++) cin >> p[i];
  for (long long i = 1; i <= n + m; i++) p[i] += p[i - 1];
  vector<vector<long long>> dp(M + 1, vector<long long>(n + 1, -inf));
  for (long long i = 0; i <= n; i++) dp[0][i] = 0;
  for (long long i = 0; i <= M; i++) dp[i][0] = 0;
  for (long long i = n - 1; i >= 0; i--) {
    long long a = l[i];
    for (long long j = n - 1; j >= 0; j--) {
      dp[a][j + 1] =
          max(dp[a][j + 1],
              dp[a][j] + p[a + __builtin_ctzll(j + 1)] - p[a - 1] - c[i]);
    }
    for (long long x = a; x < M; x++) {
      for (long long j = 0; j <= (n >> (x - a)); j++) {
        dp[x + 1][j / 2] = max(dp[x + 1][j / 2], dp[x][j]);
      }
    }
  }
  cout << dp[M][0] << '\n';
}
