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

a = 0
ans = 0
for i in A:
  ans += B[i - 1]
  if a == i - 1:
    ans += C[a - 1]
  else:
    pass

print(ans)