n = int(input())

a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

answer = 0

for x in range(n):
  answer += b[a[x] - 1]
  if x >= 1:
    if a[x-1] < len(c) + 1:
      answer += c[a[x - 1] - 1]

print(answer)
