N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
for i in range(N-1):
  if A[i] == A[i+1]-1:
    B.append(C[A[i]-1])
    
print(sum(B))