n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
#print(a,b,c)
s = 0
b_ia = 0
for ia in a:
  #print(ia)
  s += b[ia-1]
  if (b_ia + 1) == ia:
    s+= c[b_ia-1]
  b_ia = ia
print(s)