n = int(input())
a = tuple(map(int,input().split()))
b = tuple(map(int,input().split()))
c = tuple(map(int,input().split()))
l = 30
ans = 0
for i in range(n):
    ans += b[a[i]-1]
    if l+1 == a[i]:
        ans += c[i-2]
    l = a[i]
print(ans)