#include <bits/stdc++.h>
using namespace std;
int l[5050], s[5050], c[5050], mx[5050], top[5050];
int q[5050][5050], qq[5050], f[5050][5050];
int n, m;
void solve() {
  int ans = 0;
  memset(f, 233, sizeof(f));
  for (int i = 1; i <= n + m; i++) f[i][0] = 0;
  for (int i = n; i >= 1; i--) {
    int L = l[i];
    for (int j = mx[L]; j >= 0; j--) {
      int val = f[L][j] + s[i];
      int t = j + 1;
      for (int p = L; t;) {
        f[p][t] = max(f[p][t], val);
        mx[p] = max(mx[p], t);
        p++;
        t /= 2;
        val = val + c[p] * t;
      }
      ans = max(ans, val);
    }
    for (int j = 1; j <= n + m; j++) {
      f[j][0] = max(f[j][0], max(f[j - 1][0], f[j - 1][1]));
    }
  }
  cout << ans << endl;
  return;
}
int main() {
  cin >> n >> m;
  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 <= n + m; i++) {
    cin >> c[i];
  }
  for (int i = 1; i <= n; i++) {
    s[i] = c[l[i]] - s[i];
  }
  solve();
  return 0;
}
