n = int(input())
a = []
b = []
c = []
work = 0
total = 0
i = 0
test = 0
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
while(i < n):
  work = a[i]
  total = total + b[work - 1]
  if(test == a[i] - 1):
    total = total + c[test - 1]
  test = a[i]
  i = i + 1
print(total)