def main():

    n = int(eval(input()))

    a = list(map(int, input().split()))

    b = list(map(int, input().split()))

    c = list(map(int, input().split()))

    point = sum(b)



    for i in range(1,n):

        if a[i-1] +1 == a[i]:

            point += c[a[i-1]-1]





    print(point)



if __name__ == '__main__':

    main()
def main():

    n = int(eval(input()))

    a = list(map(int, input().split()))

    b = list(map(int, input().split()))

    c = list(map(int, input().split()))

    total_score = sum(b)



    for i in range(1, n):

        prev = a[i - 1]

        if prev + 1 == a[i]:

            total_score += c[prev - 1]



    print(total_score)





if __name__ == '__main__':

    main()

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


if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    c = list(map(int, input().split()))
    total_score = sum(b)
    for i in range(1, n):
        prev = a[i - 1]
        if prev + 1 == a[i]:
            total_score += c[prev - 1]
    print(total_score)


if __name__ == "__main__":
    main()

-    point = sum(b) +    total_score = sum(b) -        if a[i - 1] + 1 == a[i]: -            point += c[a[i - 1] - 1] -    print(point) +        prev = a[i - 1] +        if prev + 1 == a[i]: +            total_score += c[prev - 1] +    print(total_score)