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

ans = 0

for i in range(n):
      #print(i)
      ans += b[a[i]-1]
      #print("ans",ans)
  #print("aaa",a[i])
      if i != 0:
        hantei = a[i-1] + 1
        if a[i] == hantei:
            ans += c[i]
    
print(ans)