n = int(input())
a = input().split()
b = input().split()
c = input().split()
sum = 0
number = -2

for i in a:
  k = int(i)-1
  sum += int(b[k])
  if number + 1 == k:
    sum += int(c[k-1])
  number = k
print(sum)