fun main(args : Array<String>) {
  val n = readLine()
  val a =  readLine()!!.split(" ").map{ it.toInt() }
  val b =  readLine()!!.split(" ").map{ it.toInt() }
  val c =  readLine()!!.split(" ").map{ it.toInt() }
  var score: Int = 0
  var last: Int = -10
  for(i in 0 until a.size){
    score += b[a[i] - 1]
    if(last + 1 == a[i]){
      score += c[a[i] - 1 - 1]
    }
    last = a[i]
  }
  println(score)
}