integer N
integer,allocatable,dimension(:)::A,B,C
integer ans
read*,N
allocate(A(N),B(N),C(N-1))
read*,A
read*,B
read*,C
ans=0
do i=1,N
  if(A(i)/=N)then
    if(A(i)+1==A(i+1))ans=ans+C(A(i))
  endif
end do
ans=ans+sum(B(i))
print"(I0)",ans
end