n = int(input())
qq= list(map(int,input().split()))
ww = list(map(int,input().split()))
c = list(map(int,input().split()))
t = 0
for i in range(n):
  if i != 0:
    t = t+ww[qq[i]-1]+c[qq[i]-2]
  else:
    t = t + ww[qq[i]-1]
print(t)
  
