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

sum = 0
before = 0
for i in range(n):
  sum += b[a[i]-1]
  if(a[i] == before+1): sum += c[before-1]
  before = a[i]  

print(sum)