program ABC140B
    implicit none
    integer::N,i,ans=0
    integer,allocatable::A(:),B(:),C(:)
    read*,N
    allocate(A(N))
    allocate(B(N))
    allocate(C(N-1))
    read*,A,B,C
    do i=1,N
        ans=ans+B(A(i))
        if(i>=2.and.A(i)-A(i-1)==1)ans=ans+C(A(i-1))
    end do
    print'(i0)',ans
end program ABC140B