#include <bits/stdc++.h>
using namespace std;
int agr[5005];
int co[5005];
int pro[5005];
int dp[3005][5005];
int mx[5005][5005];
const int inf = 2e9;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> agr[i];
  for (int i = 1; i <= n; i++) cin >> co[i];
  for (int i = 1; i <= n + m; i++) cin >> pro[i];
  for (int i = 0; i < 5005; i++)
    for (int j = 0; j < 5005; j++) mx[i][j] = -inf;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      dp[i][j] = -inf;
      int cur = j;
      long long sm = 0;
      for (int k = agr[i]; 1; k++) {
        long long nans = mx[k][cur + 1] + sm;
        if (nans > dp[i][j]) dp[i][j] = nans;
        if (!cur) {
          if (sm > dp[i][j]) dp[i][j] = sm;
          break;
        }
        sm += (cur / 2) * pro[k + 1];
        cur /= 2;
      }
      dp[i][j] -= co[i];
      dp[i][j] += pro[agr[i]];
      mx[agr[i]][j] = max(mx[agr[i]][j], dp[i][j]);
      if (j == 1)
        for (int s = 1; s < agr[i]; s++) mx[s][1] = max(mx[s][1], dp[i][j]);
    }
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = max(ans, dp[i][1]);
  cout << ans << endl;
  return 0;
}
