#include <bits/stdc++.h>
int main(void) {
  int n, i, j, x, y, z;
  scanf("%d", &n);
  int a[n];
  int b[50];
  int c[50];
  for (x = 1; x <= n; x++) {
    scanf("%d", &a[x]);
  }
  for (y = 1; y <= n; y++) {
    scanf("%d", &b[y]);
  }
  for (z = 1; z <= n; z++) {
    scanf("%d", &c[z]);
  }
  int sum = 0;
  for (i = 0; i <= n; i++) {
    sum = ++b[i];
  }
  for (j = 0; j <= n; j++) {
    if (a[j] + 1 == a[j + 1]) {
      sum = ++c[j];
    }
  }
  printf("%d", sum);
  return 0;
}
