n = int(input())
a = list(map(int,input().split()))
b= list(map(int,input().split()))
c = list(map(int,input().split()))

m=0

for i in range (0,n):
  m += b[a[i]-1]
  if a[i]!=n and i!=n-1:
    m += c[a[i]-1]
print(m)
  