#include <bits/stdc++.h>
int N, M;
int **sol;
int max_sol = 0;
int *level, *cost, *income;
int kInvalid = -10000000;
int **alloc_memory() {
  sol = (int **)malloc(sizeof(int *) * (N + M + 1));
  for (int i = 0; i <= N + M; ++i) {
    sol[i] = (int *)malloc(sizeof(int) * (N + 1));
    for (int j = 0; j <= N; ++j) {
      sol[i][j] = kInvalid;
    }
  }
  level = (int *)malloc(sizeof(int) * (N));
  cost = (int *)malloc(sizeof(int) * (N));
  income = (int *)malloc(sizeof(int) * (N + M + 1));
  return sol;
}
void free_memory() {
  for (int i = 0; i <= N + M; ++i) {
    free(sol[i]);
  }
  free(sol);
  free(level);
  free(cost);
  free(income);
}
void update(int lev, int cnt, int value) {
  if (value > sol[lev][cnt]) {
    sol[lev][cnt] = value;
    if (cnt == 1 && value > max_sol) {
      max_sol = value;
    }
  }
}
void fight(int n, int cnt) {
  int lev = level[n];
  update(lev, cnt + 1, sol[lev][cnt] + income[lev] - cost[n]);
  ++cnt;
  while (cnt > 1) {
    int cnt2 = cnt / 2;
    update(lev + 1, cnt2, sol[lev][cnt] + cnt2 * income[lev + 1]);
    cnt = cnt2;
    ++lev;
  }
}
int main() {
  scanf("%d%d", &N, &M);
  alloc_memory();
  for (int n = 0; n < N; ++n) {
    scanf("%d", level + (N - 1 - n));
  }
  for (int n = 0; n < N; ++n) {
    scanf("%d", cost + (N - 1 - n));
  }
  for (int l = 1; l <= N + M; ++l) {
    scanf("%d", income + l);
  }
  for (int n = 0; n < N; ++n) {
    for (int cnt = n; cnt > 0; --cnt) {
      if (sol[level[n]][cnt] > kInvalid) {
        fight(n, cnt);
      }
    }
    update(level[n], 1, income[level[n]] - cost[n]);
    for (int i = 1; i < level[n]; ++i) {
      if (sol[i][1] > kInvalid) {
        update(level[n], 1, sol[i][1] + income[level[n]] - cost[n]);
      }
    }
  }
  printf("%d\n", max_sol);
  free_memory();
  return 0;
}
