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(n):
  m += b[a[i]-1]
  if i==0:
    continue
  if a[i] == a[i-1]+1:
    m += c[i]
    
print(m)