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