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

s = 0
t = 0
for i in a:
  s += b[i-1]
  t += 1
  if t != n and i != n:
    s += c[i-1]
print(s)