n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
g=0
for i in range(n):
  g+=b[a[i-1]-1]
  if i!=n-1 and a[i]==a[i+1]-1:
    g+=c[a[i]-1]
print(g)