n = int(input())
a = list(map(int,input().split()))
ans = sum(list(map(int,input().split())))
c = list(map(int,input().split()))
for i in range(1,n):
    if a[i-1]+1==a[i]: ans+=c[a[i-1]-1]
print(ans)