program main
  
  implicit none
  !0858
  integer :: n
  integer,allocatable :: a(:), b(:), c(:)
  integer :: i, sat
  
  read(*,*) n
  allocate( a(n) )
  allocate( b(n) )
  allocate( c(n-1) )
  read(*,*) a
  read(*,*) b
  read(*,*) c
  
  sat = 0 
  do i = 1, n
    sat = sat + b(a(i)) 
    if( a(i) == a(i-1)+1 .and. i > 1 ) then
      sat = sat + c(a(i-1)) 
    end if
  end do
  
  print*, sat
  
end program main
