N = int(input())
A_list = list(map(int, input().split()))
B_list = list(map(int, input().split()))
C_list = list(map(int, input().split()))

out = 0
out += sum(B_list)
print("out", out)

a_prev = 0

for index, a in enumerate(A_list):
    print(index, a, a_prev)
    if a_prev == 0:
        a_prev = 0
    elif a - a_prev == 1:
        out += C_list[index]
    a_prev = a
    
print(out)