n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))

kotae = 0

for i in range(n):
  kotae += B[A[i]-1]
  if (A[i]-A[i-1])==1:
            kotae += C[A[i-1]-1]
print(kotae)  