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()]
sat = 0

for i in a:
  sat += b[i-1]
  pre = i
  if pre + 1 == i:
    sat += c[pre-1]

print(sat)  
