import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextInt()
    val a, b = List.fill(n)(sc.nextInt())
    val c = List.fill(n - 1)(sc.nextInt())
    var sum = 0
    var before = -10
    for (i <- 0 until n) {
      sum += b(a(i) - 1)
      if (before + 1 == a(i)) {
        sum += c(before - 1)
      }
      before = a(i)
    }
    println(sum)
  }
}