N = int(input())
A = [int(i) for i in input().split(' ')] 
B = [int(i) for i in input().split(' ')]
C = [int(i) for i in input().split(' ')]

s = 0
last = -2
for j in range(N):
    s += B[A[j]-1]
    if A[j] == last+1:
      s += C[last-1]
    last = A[j]
    
print(s)a