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

bf = 0
af = 0
cnt_list = []
for i, order in enumerate(a):
    if i == 0:
        bf = order
    af = order
    if af - bf == 1:
        cnt_list.append(i)

print(sum(b)+c[sum(cnt_list)])