#include <bits/stdc++.h>
using namespace std;
const int N = 2000 + 10, inf = 1e9;
int n, m, s[N], l[N], c[N * 2], dp[N * 2][N];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> l[i];
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 1; i <= n + m; i++) cin >> c[i];
  reverse(l, l + n);
  reverse(s, s + n);
  for (int i = 1; i <= n + m; i++)
    for (int j = 1; j <= n; j++) dp[i][j] = -inf;
  for (int j = 0; j <= n; j++) dp[0][j] = -inf;
  for (int i = 0; i < n; i++) {
    vector<int> vec;
    for (int j = 0; j <= n; j++) vec.push_back(dp[l[i]][j]);
    for (int j = 1; j <= n; j++) {
      int sum = vec[j - 1] - s[i] + c[l[i]], num = j, lev = l[i];
      while (num) {
        dp[lev][num] = max(dp[lev][num], sum);
        num /= 2;
        lev++;
        sum += 1LL * c[lev] * num;
      }
      dp[lev][num] = max(dp[lev][num], sum);
    }
    for (int j = 1; j <= m + n; j++) dp[j][0] = max(dp[j][0], dp[j - 1][0]);
  }
  return cout << dp[n + m][0] << "\n", 0;
}
