N = int(input())
A = map(int,input().split())
B = map(int,input().split())
C = map(int,input().split())
D = A[0]
count=0
for i in A:
  if D != int(i) + 1:
    count += B[i-1]
  else:
    count += B[i-1]
    count += C[i-2]
print(count)
