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