      integer,allocatable :: a(:),b(:),c(:)
      integer :: n,i,k,ans,before
      
      
      read*,n
      allocate( a(n),b(n),c(n-1) )
      read*,a(1:n)
      read*,b(1:n)
      read*,c(1:n-1)
      
      
      ans = 0
      before = -100
      do i = 1,n
        ans = ans + b( a(i) )
        
        if( a(i)==before+1 )then
          ans = ans + c(before)
        end if
        before = a(i)
   !     print*,ans,before
      end do
      
      print*,ans
      end