n = int(input())
eat_lst = list(map(int,input().split()))
manzoku_lst = list(map(int,input().split()))
tuika_lst = list(map(int,input().split()))

res = sum(manzoku_lst)
#eat_lstの並びを確認し、iの次にi+1を食べていたらtuika_lstの値を加算

for i in range(n-1):
    if eat_lst[i] + 1 == eat_lst[i+1]:
        res = tuika_lst[i] + res
print(res)
